Perl Question
Jeremy Russell
jrussel at channelpoint.com
Wed Jul 12 14:51:48 CDT 2000
I forgot the surrounding eval statement...the code was being dynamically
generated.
-----Original Message-----
From: Keary Suska [mailto:aksuska at insideflyer.com]
Sent: Wednesday, July 12, 2000 12:03 PM
To: Pikes Peak Perl Mongers
Subject: Re: Perl Question
I would imagine that you either have an invalid declaration, invocation, or
something inhibiting a normally acceptable invocation such as use strict or
a scoping issue.
Proper declaration:
$subref = sub { code_here };
Proper invocation:
&$subref( args );
or
Package::&$subref;
After checking declaration/invocation syntax, I would comment out the use
strict, and see if it works. If it doesn't, I would check my scope--is the
sub declared in the correct package? Is it possible for the subroutine
reference variable to be out of scope?
Without seeing code, I can't see to help more.
> Well, that is difficult to give you. We generate the code on the fly
using
> a Database field.
Are you not able to duplicate the conditions which generated the code in the
first place? Blind code generation works in theory, but often *only* in
theory ;-)
Regards,
Keary Suska
Mgr., Information Technologies
Frequent Flyer Services
http://www.webflyer.com/
mailto: aksuska at webflyer.com
(719) 597-8899 x737
(719) 597-6855 (fax)
> From: Jeremy Russell <jrussel at channelpoint.com>
> Date: Wed, 12 Jul 2000 10:50:42 -0600
> To: Pikes Peak Perl Mongers <pikes-peak-pm-list at happyfunball.pm.org>
> Subject: RE: Perl Question
>
>
> Here is the problem that we are trying to solve:
> We don't know what tee code will be in the sub prior to run time.
> We want to dynamically create the code at runtime according to code
> listed in the database.
>
> Any suggestions?
>
> Jeremy
>
> -----Original Message-----
> From: Rob Nagler [mailto:nagler at bivio.com]
> Sent: Wednesday, July 12, 2000 10:37 AM
> To: Pikes Peak Perl Mongers
> Subject: Re: Perl Question
>
>
>> Anyone know what this error means using Anonymous subs?
>
> It would help to see the code. Does your code have something
> like "sub(....)" in it? That's what the message would indicate.
> You probably want "sub { ...}" to declare an anonymous sub.
>
> -----Original Message-----
> From: Jeremy Russell [mailto:jrussel at channelpoint.com]
> Sent: Wednesday, July 12, 2000 10:34 AM
> To: 'Tim Chambers'; Pikes Peak Perl Mongers
> Subject: Perl Question
>
>
> Anyone know what this error means using Anonymous subs?
>
> *** 'e:\Inetpub\wwwroot\hr\apply.pl' error message at: 2000/07/12 10:18:24
> Undefined subroutine &Table::sub {print ("<BR>test db<BR>");} called at
> Table.pm line 109.
>
>
More information about the Pikes-peak-pm
mailing list