Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Wychwood] Custom.pm problem

Quote Reply
Re: [Wychwood] Custom.pm problem In reply to
I made a working solution, but I don't like this so much.
I had to pass the $IN, $CFG, $GLOBALS, $USER global variables to the called sub, which is not really logical...

Global:
Code:
'menu_left' => 'sub {
use Links::test;
Links::test::menu_template($IN, $CFG, $GLOBALS, $USER);
use GT::Dumper;
print "Content-Type: text/html\n\n";
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";

}',


Links/test.pm:
Code:
package Links::test;
# ==================================================================
use strict;
use vars qw/$GRAND_TOTAL $IN $CFG/;
use GT::Dumper;


sub menu_template {
# --------------------------------------------------------
# This routine determines how the rate failure page will look like.

($IN, $CFG) = @_;
print "Content-Type: text/html\n\n";
print "\$CFG: " . GT::Dumper::Dumper(\$CFG) . "<br>\n\n";
}

This prints the $CFG correctly, but I still would like to have the globals exported to my module's namespace.


Any idea how to reach this?

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...

Last edited by:

webmaster33: Aug 26, 2007, 10:44 AM
Subject Author Views Date
Thread Custom.pm problem webmaster33 6503 Aug 22, 2007, 2:32 PM
Thread Re: [webmaster33] Custom.pm problem
Wychwood 6360 Aug 23, 2007, 2:26 AM
Thread Re: [Wychwood] Custom.pm problem
webmaster33 6369 Aug 26, 2007, 9:23 AM
Thread Re: [webmaster33] Custom.pm problem
Wychwood 6355 Aug 27, 2007, 3:58 PM
Thread Re: [Wychwood] Custom.pm problem
webmaster33 6329 Aug 27, 2007, 4:18 PM
Thread Re: [webmaster33] Custom.pm problem
brewt 6349 Aug 27, 2007, 8:57 PM
Thread Re: [brewt] Custom.pm problem
webmaster33 6319 Aug 28, 2007, 2:22 AM
Thread Re: [webmaster33] Custom.pm problem
brewt 6324 Aug 28, 2007, 10:28 AM
Thread Re: [brewt] Custom.pm problem
webmaster33 6349 Aug 28, 2007, 12:40 PM
Post Re: [webmaster33] Custom.pm problem
eupos 6299 Aug 28, 2007, 12:45 PM
Post Re: [Wychwood] Custom.pm problem
webmaster33 6330 Aug 26, 2007, 10:41 AM