Gossamer Forum
Quote Reply
$CFG
Does anyone have any idea why this code is returning nothing?

my $extension = $CFG->{"build_extension"};

Also tried;

my $extension = $CFG->{build_extension};
and
my $extension = $CFG->{'build_extension'};

Its just giving a blank variable. Works with the paths etc...but just not this Unsure Do I need to access it via another method?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] $CFG In reply to
Dump the hashref to see what it contains.
Quote Reply
Re: [Paul] $CFG In reply to
Weird...none of the $CFG, $IN or $DB variables are available. I tried to do a Data::Dumper on them, as well as calling values I know exist, and worked fine earlier on. The way I have my code structured is;

Code:
sub here {

foreach (@array) {
&another_one($_);
}

}

sub another_one {
# do stuff here
}

Is there any reason why this would stop the variables becoming avbailable Unsure

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] $CFG In reply to
I don't see reasons. Your code seems fine.

Just a few ideas:
1) Are these available in your code?:
use Links qw/$CFG $IN $DB $USER/;
@Plugins::Pluginname::ISA = qw(GT::Base);

2) Are you sure you use global $CFG is no not local? E.g. you never used "my $CFG".

3) Did you try to turn on debugging?

4) Try to print out $CFG at several parts of your plugin. Try to print at the plugin start first. Do active debugging this way.
Also try to print $CFG in other plugin, too, to check if the core code is intact.

No more ideas at the moment.
Probably we may need to see more code.

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