in reply to Re^19: How to completely destroy class attributes with Test::Most?
in thread How to completely destroy class attributes with Test::Most?
Nice, I got the File::Collector subclass down to one sub and just a few lines of code now:
package File::Collector::DateClassifier ; use strict; use warnings; use Log::Log4perl::Shortcuts qw(:all); use File::Collector::DateClassifier::Iterator; use parent qw ( File::Collector ); sub _classify_files { my ($s, $files_added) = @_; $s->add_iterators( qw ( some_files other_files ) ); foreach my $file (sort @$files_added) { $s->add_to_iterator('some_files', $file); } } return 1;
This feels fun, now. I feel like I can call myself an intermediate Perl programmer now. Only took 20 years. :)
Thanks again for all your time advising me on this. I learned a lot. I'll post this up to CPAN when I think it's CPAN worthy. I got it on a git for now: File::Collector
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^21: How to completely destroy class attributes with Test::Most?
by jcb (Parson) on Aug 30, 2019 at 23:59 UTC |