in reply to version based compilation
That seems to do what you asked for. So you can use File::Copy, and then at some point unalias('main', 'copy'); and the alias is removed. Is that what you meant?# Usage: unalias ($package, $name) # Will remove the subroutine entry from the package's glob sub unalias { my ($package, $name) = @_; no strict; # Disable the safety systems local *temp; # Make a local glob my $glob = ${"${package}::"}{$name}; # Grab the glob *temp = *$glob{SCALAR}; # Copy the scalar part *temp = *$glob{ARRAY} if defined *$glob{ARRAY}; *temp = *$glob{HASH} if defined *$glob{HASH}; *temp = *$glob{IO} if defined *$glob{IO}; *temp = *$glob{FORMAT} if defined *$glob{FORMAT}; ${"${package}::"}{$name} = *temp; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: version based compilation
by steves (Curate) on Dec 29, 2001 at 21:24 UTC | |
by robin (Chaplain) on Dec 30, 2001 at 04:19 UTC | |
by steves (Curate) on Dec 30, 2001 at 04:47 UTC |