Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • One of the major reasons that I normally use the one package one file rule is that it allows easier testing. It's a seperate block. It's easier to test. Yey!

    The other reason is that if I stick it in a seperate file then I can document it with POD. I can't do that in the middle of some other class (and even at the end it looks wrong)

    OTOH, sometimes you don't need to document something in the POD - I wouldn't enforce you to document every private method (you might want to hide the interface) and therefore I shouldn't force you to document it just because it's in a different namespace.

    Infact, the only module I've ever uploaded to CPAN uses an 'inner class'. I needed a tied filehandle to capture the output of Test::Builder. No-one cares that I'm using it - it doesn't effect your code - so it's not mentioned in the POD. And I can't test it alone!