I could only get it to work as a method:
sub new {
my $class = shift;
my $self = [EMAIL PROTECTED];
bless( $self, $class );
}
sub tester {
my $self = shift;
my $hash = shift if @_;
if( $hash ) {
print "$hash->{key}\n";
} else {
print "No Hash\n";
}
}
my $sub_ref = new;
my $subroutine_name = "tester"; # can't change
my $hashref = { key => "value" }; # can't change
eval { $sub_ref->$subroutine_name( $hashref ) };
Boysenberry
boysenberrys.com | habitatlife.com | selfgnosis.com
On Nov 12, 2005, at 1:56 AM, James Reynolds wrote:
$subroutine_name = "something"; # can't change
$hashref->{'key'}='value'; # can't change
eval "$subroutine_name($hashref)"; # how do I eval this? It doesn't
eval.