Antti Lankila (via RT) <perlbug-followup@perl.org> wrote: > > I don't really care if this ever gets fixed or not, as I suspect people who > make use of typeglob aliases deserve what they get. But nevertheless, I would > like to have a clean way to alias functions to different names, as I sometimes > need this feature. The less typing and runtime overhead to it, the better. > > % perl -wle 'use Carp; *foo = \&bar; sub bar { confess("Should be foo") } foo()' > Should be foo at -e line 1 > main::bar() called at -e line 1 I think that's intended, or at least useful, behaviour. Consider the following script: #!perl package Foo; use Carp; use Exporter; BEGIN { our @ISA = 'Exporter'; our @EXPORT = 'bar'; } sub bar { confess("Mea culpa") } package main; BEGIN { Foo->import(); } bar(); __END__ It outputs: Mea culpa at /home/rafael/x line 9 Foo::bar() called at /home/rafael/x line 12 with the full name (as opposed to the aliased name) of the offending function. It looks more useful to the programmer. -- Unending is not *NIXThread Previous