in reply to Re: How to export un-exist subroutines
in thread How to export un-exist subroutines
I did not need AUTOLOAD at all. Thank you again, I'm going to read your answers from now!foreach (keys %$reg) { no strict 'refs'; my $regkey = $_ or next; my $regval = $reg->{$regkey} or next; my $sub = sub { return 1 if shift =~ /$regval/; }; *{'is_'.$regkey} = $sub; } our @EXPORT = do { no strict 'refs'; my @list; foreach (keys %Str::) { eval {my $sub = *$_{CODE};}; push @list, $_ if !$@; } @list; };
|
|---|