So, is it copy/paste programming if I use for my $i ( 1 .. 10 ) { in two different programs?
Should I do that as:
use Useful::For qw[ ForRange ];
ForRange \my $i, 1, 10, {
print $$i;
}
?
How about a Useful::If, and a Useful::While and a ...
Of course, now all our programs have to start with:
use Useful::For qw[ ForRange ];
use UseFul::If;
use UseFul::While;
...
But that is so repetative. That has to be a candidate for a module right!
use Useful;
Use qw[ For If While ];
...
But hang on. We lost the ability to select individual routines from each module. We have to fix that, so:
use Useful;
Useful {
For => qw[ ForRange ],
If => qw[ :all ],
While => qw[ :all ],
};
Better, but still a lot of C&P. How about:
use Perl qw[ :all ];
Perfect!
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|