perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Harrison" <shado...@doublebagel.com>
Subject RE: Modules not functioning correctly
Date Sat, 26 Jul 2003 19:15:26 GMT
..If I refresh enough it randomly works fine.

Whats going on?

Justin 

-----Original Message-----
From: Justin Harrison [mailto:justin@astyrrian.com] 
Sent: Saturday, July 26, 2003 3:13 PM
To: embperl@perl.apache.org
Subject: Modules not functioning correctly

Hi,

I have the following code:

[- $verify = Execute ({'object' => '/.../code.pm',syntax => 'Perl'}); -]

Inside code.pm:

sub code_form_input_errors {
use Embperl::Form::Validate;
use lib '/.../code';
use rules;
my $epf = new Embperl::Form::Validate(&codeform);

my $errors = $epf -> validate_messages;


if (@{$errors}) {
	return $errors;
} else {
	return;
}	
}

However, randomly, when I invoke:

[- $code_input_errors = $code->code_form_input_errors -]

I get:

[26754]ERR: 24: Error in Perl code: Undefined subroutine
&Embperl::__4::codeform called at /.../code.pm line 8.  

Sometimes it happens. Sometimes it doesn't. Why? What is going on?

Rules.pm looks like this:

sub codeform {
return([
	[-key => 'username',
  	-name => 'Username',
  	-msg => 'Please enter a Username.',
  	required =>'1',
	-msg => 'The Username entered was too short.',
	length_min =>'1',
	-msg => 'The Username entered was too long.',
	length_max =>'15',
	],

	[-key => 'token',
	-name => 'Verification Token',
  	-msg => 'Please enter a Verification Token.',
  	required => '1',
	-msg => 'The Verification Token entered was too short.',
	length_min => '1',
	-msg => "The Verification Token entered was too long.",
	length_max => '60',
	],        	
]);
}

1;

I've avoided explicitly stating package names, but I still get this madness?

Justin


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message