Thats a better solution to the problem (mine causes c++ to become 'c__', which is just too cryptic).
If explicit remapping were available, should the automagic remapping of ugly characters to underscore be kept? I'm leaning towards no.
Also, why choose an alist over a hash? Just a style thing? (
Update: nevermind, I see now that it allows you to map a shell name to multiple perl names elegantly)
Update 2: Here's the patch:
--- 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"};
}
}