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

Variables $IN, $CFG etc not being passed along...

Quote Reply
Variables $IN, $CFG etc not being passed along...
Does anyone have any idea why the $CFG, $IN, $DB etc variables are not being passed in correctly to this script? I have played with it, but can't seem to find the problem Frown

The code is;

Code:
#!/usr/bin/perl

use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/$CFG $IN $DB/;
use LWP::Simple;

# Inherit from base class for debug and error methods
@Plugins::Test_Plugin::ISA = qw(GT::Base);

# Change directory to our admin one...
chdir('/home/virtual/site9/fst/var/www/cgi-bin/admin');

print "Content-type: text/html \n\n";

print $IN->header();

print "Test ... ";

I use this kind of header in pretty much all of my scripts, so I'm pretty confused as to why these variables are not available :(

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] Variables $IN, $CFG etc not being passed along... In reply to
These globals are initialized by
Code:
Links::init('/path/to/links/admin');

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Variables $IN, $CFG etc not being passed along... In reply to
OMG...how did I miss that Frown I must have been getting the chdir() and Links::init() bit confused.

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!