Wychwood,
Good idea, however, I did not get better result.
Here is the whole test case:
Global contains the following:
'menu_left' => Links::Custom::SiteHTML::menu_template(),
Custom.pm:
# ==================================================================
use strict;
require Links;
import Links qw/$IN $CFG $GLOBALS $USER/;
use vars qw/$GRAND_TOTAL/;
use GT::Dumper;
print "Content-Type: text/html\n\n";
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";
sub menu_template {
# --------------------------------------------------------
# This routine determines how the rate failure page will look like.
require Links;
import Links qw/$IN $CFG $GLOBALS $USER/;
use GT::Dumper;
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";
}
Error:
BEGIN not safe after errors--compilation aborted at /admin/Links/Custom.pm line 20.
Compilation failed in require at /admin/Links.pm line 28.
BEGIN failed--compilation aborted at /admin/Links.pm line 28.
Compilation failed in require at page.cgi line 17.
BEGIN failed--compilation aborted at page.cgi line 17.
Premature end of script headers: page.cgi
Any idea?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Good idea, however, I did not get better result.
Here is the whole test case:
Global contains the following:
'menu_left' => Links::Custom::SiteHTML::menu_template(),
Custom.pm:
Code:
package Links::Custom::SiteHTML; # ==================================================================
use strict;
require Links;
import Links qw/$IN $CFG $GLOBALS $USER/;
use vars qw/$GRAND_TOTAL/;
use GT::Dumper;
print "Content-Type: text/html\n\n";
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";
sub menu_template {
# --------------------------------------------------------
# This routine determines how the rate failure page will look like.
require Links;
import Links qw/$IN $CFG $GLOBALS $USER/;
use GT::Dumper;
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";
}
Error:
Quote:
Global symbol "$CFG" requires explicit package name at /admin/Links/Custom.pm line 11. BEGIN not safe after errors--compilation aborted at /admin/Links/Custom.pm line 20.
Compilation failed in require at /admin/Links.pm line 28.
BEGIN failed--compilation aborted at /admin/Links.pm line 28.
Compilation failed in require at page.cgi line 17.
BEGIN failed--compilation aborted at page.cgi line 17.
Premature end of script headers: page.cgi
Any idea?
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...