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

calling sitestats plugin from my script

Quote Reply
calling sitestats plugin from my script
Whenever i try to call sitestats, use Plugins::SiteStats;
from my script i get the following error:
Can't call method "table" on an undefined value at ..../admin/Plugins/SiteStats.pm line 29.

Anybody got any ideas why its not working?

This is how my script starts:
use strict;
use lib '/..../cgi-bin/links/admin';
use Links qw/$IN $DB $CFG/;
use Links::Plugins;
use Links::SiteHTML;
use CGI::Carp qw(fatalsToBrowser);
use Plugins::ExtraStats;
use Plugins::SiteStats; # <--- this line causes the problem

Thanks

Hagai
Quote Reply
Re: [hagai] calling sitestats plugin from my script In reply to
Can you tell me which version of SiteStats you are using?
Quote Reply
Re: [afinlr] calling sitestats plugin from my script In reply to
In case anyone else is getting similar error messages, I've uploaded the a new version containing the fix.