I saw someone mention this error with one of my plugins the other day and I've just got it myself.
Putting:
Links::reset_env( { load_user => 1 } ) if ($Links::PERSIST);
....in a cgi script keeps giving undefined subroutine reset_env
Im using mod_perl if that makes a difference.
Here is the full chunk of code:
use strict;
use lib '/my/path';
use Links qw/$CFG/;
use Plugins::MyModule;
Links::init('/path');
Links::init_user();
local $SIG{__DIE__} = \&Links::fatal;
Links::reset_env( { load_user => 1 } ) if ($Links::PERSIST);
if (Links->check_request()) {
GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_cart', \&Plugins::MyModule::handle);
}
...what did I do wrong?
Putting:
Links::reset_env( { load_user => 1 } ) if ($Links::PERSIST);
....in a cgi script keeps giving undefined subroutine reset_env
Im using mod_perl if that makes a difference.
Here is the full chunk of code:
use strict;
use lib '/my/path';
use Links qw/$CFG/;
use Plugins::MyModule;
Links::init('/path');
Links::init_user();
local $SIG{__DIE__} = \&Links::fatal;
Links::reset_env( { load_user => 1 } ) if ($Links::PERSIST);
if (Links->check_request()) {
GT::Plugins->dispatch ($CFG->{admin_root_path} . '/Plugins', 'user_cart', \&Plugins::MyModule::handle);
}
...what did I do wrong?
