in reply to Re: Re: Useful addition to Perl?
in thread Useful addition to Perl?
Actually, I started this, myself, a while ago... only (in order to avoid certain baddnesses of blowing up @ARGV to impossibly stupidly large proportions) it went a little more like this:
So that @ARGV didn't actually get enormous... it just added items to the front as while (<>) { implicitly unshift'd stuff off it.package r; use strict; use File::Spec; tie @ARGV, 'r::Tie::RecursiveARGVArray', @ARGV; sub import { } package r::Tie::RecursiveARGVArray; use Tie::Array; use base 'Tie::StdArray'; sub TIEARRAY { my ($classname,@init) = @_; bless [@init], $classname; } sub FETCH { # magic here to explode directory contents if -d } # etc
You can tell by the way that it starts that, actually,
was sufficient (who's got time for the shift key, anyway?). Too bad I never finished... coulda been a neat CPAN contribution... oh, well. Maybe someday, if no one runs off from reading these posts and implements it before I have time to finish it.perl -mr -e ...
------------ :Wq Not an editor command: Wq
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4 Useful addition to Perl?
by etcshadow (Priest) on Mar 05, 2004 at 05:39 UTC | |
by demerphq (Chancellor) on Mar 06, 2004 at 13:53 UTC | |
by etcshadow (Priest) on Mar 07, 2004 at 21:47 UTC | |
by demerphq (Chancellor) on Mar 07, 2004 at 22:24 UTC | |
by etcshadow (Priest) on Mar 08, 2004 at 06:32 UTC | |
| |
by BrowserUk (Patriarch) on Mar 06, 2004 at 11:12 UTC | |
by tsee (Curate) on Mar 06, 2004 at 10:59 UTC |
In Section
Meditations