Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • To be fair, Damian responded to my query, but he didn't answer my question. He gave more an example of how submethods are used, rather than why they are used.

    Subroutines are useful inside classes, for factoring class-specific implementation details out of the class's methods. The main reason they're useful is because they're not part of the object interface, and are not inherited. So they can be used purely as encapsulated implementation.

    But factoring method implementations out into a subroutines