[Thamesvalley-pm] perl subroutine refs

ed ed-pm at s5h.net
Tue Nov 13 14:05:43 PST 2007


Hi,

I'm trying to do something to compare scriptable plugin methods between
php and perl, but I have a problem in that I cannot figure out how to
do it with strict:

#!/usr/bin/perl

use warnings;
use strict;

my %subs;

sub test {
	print( "Tested\n" );
}

my $l = "test";

$subs{'plugname'} = &$l;
$subs{'plugname'};

The error message insists that this is not possible while using strict
refs, but I'd like to be able to continue using everything that strict
offers, is there a 'safe' way to do this?

-- 
The T1 to Radvision is A.F.U. because of a glitch.
RedHat is watching IP theater.
:: http://www.s5h.net/ :: http://www.s5h.net/gpg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/thamesvalley-pm/attachments/20071113/335e5218/attachment.bin 


More information about the Thamesvalley-pm mailing list