I am using Apache::Register to process stuff (I don't know how that works or really have a grip on how it affects the code, but):
Say I have this:
%states = (
'Default' => '\&front_page(@)',
'Lost' => '\&lost(@)',
);
This gives me
Can't use string ("\&logoff(@)") as a subroutine ref while "strict refs" in use at (eval 69) line 113.
Alternately:
%states = (
'Default' => \&front_page(@),
'Lost' => \&lost(@),
);
This gives me a syntax error (on the last line with the end-paren and semicolon).
What gives? What is the right way to do this? I was trying to just copy the text out of the Perl Cookbook but that didn't seem to work (with the syntax error and all). The syntax error IS in this somewhere--I commented it out, and perl -c said everything else was OK. Maybe I should just turn off 'strict refs' but I'd like to know which way I'm *supposed* to be doing things.
Thanks.