|Problems? Is your data what you think it is?
Breaking up a big moduleby talexb (Chancellor)
|on Apr 25, 2019 at 12:38 UTC
talexb has asked for the wisdom of the Perl Monks concerning the following question:
I have a module like this:
and I'd like to break it up into smaller modules. The normal sub names are public methods, and the sub names with the leading underbar are private methods, so the private methods could go into another module. I managed to do
and call that as
but that's a bigger change than I'd like, and isn't as clean as the original.
I'd like to be able to have Foo::Bar (with the _aa method, and others) just be more of the Foo class (so I could still call $self->_aa in Foo, but the sub _aa would live in Foo::Bar. There's a way, but my digging so far hasn't uncovered it.