in reply to Re^3: Possible Improvement to Shell.pm
in thread Possible Improvement to Shell.pm
--- Shell.pm.old 2008-07-08 12:09:00.000000000 -0700 +++ Shell.pm 2008-07-08 19:28:17.000000000 -0700 @@ -21,8 +21,14 @@ @EXPORT = 'AUTOLOAD'; } foreach my $sym (@EXPORT) { + my ($shellsym, $perlsym); + if (ref $sym and ref $sym eq 'ARRAY') { + ($shellsym, $perlsym) = @$sym; + } else { + $shellsym = $perlsym = $sym; + } no strict 'refs'; - *{"${callpack}::$sym"} = \&{"Shell::$sym"}; + *{"${callpack}::$perlsym"} = \&{"Shell::$shellsym"}; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Possible Improvement to Shell.pm
by TGI (Parson) on Jul 09, 2008 at 02:37 UTC |