Date:   Tuesday February 11, 2003 @ 17:18
Author: matt

Update of /home/cvs/AxKit-XSP-PerForm
In directory ted.sergeant.org:/tmp/cvs-serv9628

Modified Files:
        PerForm.pm 
Log Message:
Need to use __PACKAGE__ not caller() in actual code
Log:
Submitted by:   
Reviewed by:    
PR:


Index: PerForm.pm
===================================================================
RCS file: /home/cvs/AxKit-XSP-PerForm/PerForm.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -r1.15 -r1.16
--- PerForm.pm  2003/02/08 18:00:25     1.15
+++ PerForm.pm  2003/02/11 17:18:33     1.16
@@ -1,4 +1,4 @@
-# $Id: PerForm.pm,v 1.15 2003/02/08 18:00:25 matt Exp $
+# $Id: PerForm.pm,v 1.16 2003/02/11 17:18:33 matt Exp $
 
 package AxKit::XSP::PerForm;
 
@@ -117,12 +117,12 @@
         
         $e->end_element($form_el);
         return <<EOT;
-my (\$package) = caller;
+my \$package = __PACKAGE__;
 if (my \$sub = \$package->can('$onformend' || 'end_form_$name')) {
     \$sub->(\$_form_ctxt, \$cgi->param('__submitting'));
 }
 
-#warn("submitting? ".(\$cgi->param('__submitting')?"yes":"no").", failed? 
".(\$_form_ctxt->{_Failed}?"yes":"no"));
+# warn("submitting? ".(\$cgi->param('__submitting')?"yes":"no").", failed? 
+".(\$_form_ctxt->{_Failed}?"yes":"no"));
 
 if (\$cgi->param('__submitting')) {
     foreach my \$cancel (\@_cancel_buttons) {
@@ -179,6 +179,7 @@
     
     # validate
     if ($params->{'__submitting'}) {
+        # warn("Checking if $package can " . ($onval || "validate_${name}") . "\n");
         if (my $sub = $package->can($onval || "validate_${name}")) {
             eval {
                 $sub->($ctxt, $params->{$name.$index}, $index);

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to