Hi,
I would like to call a code reference stored within an %<alnum_name>
variable from within an eval action. The demo code looks like this:
type=single
ptype=substr
pattern=SEC_STARTUP
desc=$0
action=eval %funcptr ( sub { return 1; } ); \
eval %err ( return &{%funcptr}; )
%funcptr works perfectly fine if called by a call action. But
calling from within an eval action fails. It gives "Undefined subroutine
&main::SEC::CODE":
Evaluating code 'sub { return 1; } ' and setting variable '%funcptr'
Variable '%funcptr' set to 'CODE(0xbc1bb0)'
Evaluating code 'return &{CODE(0xbc1bb0)}; ' and setting variable '%err'
Error evaluating code 'return &{CODE(0xbc1bb0)}; ': Undefined subroutine
&main::SEC::CODE called at (eval 8) line 1.
I tried different things to no avail. Is there a solution to this problem?
- Bernhard
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Simple-evcorr-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users