Next | The Identity Function | 11 |
package Eval; sub import { my $caller = caller; my ($package, $varname) = @_; $varname = 'Eval' unless defined $varname; my %hash; tie %hash => $package; *{"$caller\::$varname"} = \%hash; }
A module or program that says use Eval gets a magic variable
By default, this variable is %Eval
It's just a tied hash
What does it do?
sub FETCH { $_[1] } # Identity function
Next | Copyright © 2001 M. J. Dominus |