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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Inner classes! (Score:2)
You could nearly call that Class::Inner and have it work like Java's inner classes :)
Which IMO might be a useful thing. Inner classes definitely have their uses - maybe more so in Java.
Re:Inner classes! (Score:2)
I was thinking of this more as a testing tool so that I could generate fixtures on the fly and embed them in tests:
A persistent problem with test suites is having fixtures embedded in files and the poor programmer has to pop between several files to see them. That also means that a change to one fixture possibly means a change to a wide variety of tests (I keep getting bitten by this). With this, all fixture data can be in each test. This makes unit tests easier to manage.
Reply to This
Parent
Re: (Score:2)
Sorry - being terse today :)
I realised what it was for but it occurred to me that it might sometimes be useful outside of tests.
Re: (Score:2)
Maybe I should rename it then? It really does seem like a useful testing tool (it's already making my life easier), but perhaps others could use it. Does Class::Temp sound like a good name? It would be very useful when you find yourself passing around hashrefs but you hate locked hashes.
Re: (Score:2)