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

[v2.1.1] Fatal error when using STOP in plugin!

Quote Reply
[v2.1.1] Fatal error when using STOP in plugin!
Alex, GT staff, plugin veterans!
Got a strange plugin problem...Frown Any help appreciated!
Read this:

I dupicated the Links::User::Page.pm to be able to replace/enhance it with my own modifications.
I placed Page.pm into Plugins::Extended_link::Page.pm, renamed the handle sub to handle_page_pre, and hooked that.

My code in my copy of Page.pm looks like following:
Code:
sub handle_page_pre {
# --------------------------------------------------------------
# Wrap in a subroutine to prevent possible mod_perl probs.
#
require Plugins::Timer_Page; # used for page timing

GT::Plugins->action ( STOP );
#GT::Plugins->action ( CONTINUE );
print "\n\n<br>\n\nTesting my own plugin result...<br>\n";
print "<br>\n\$IN (input contents): " . Dumper(\$IN) . "\n";
.
.
etc.
}
# also contains copy of other subs...


When I tried to replace the execution of original code with my own, using GT::Plugins->action ( STOP ); I got the following fatal error:
Code:
A fatal error has occured:

GT::Plugins (308): Error running plugin PRE hook:
Plugins::Extended_link::Page::handle_page_pre.
Reason:
Bareword "STOP" not allowed while "strict subs" in use at
z:/WORK/CGI-BIN/lsql/admin/Plugins/Extended_link/Page.pm line 36.
Compilation failed in require at GT::Plugins::_load_hook line 261.
at GT::Plugins::_load_hook line 263.

Please enable debugging in setup for more details.

Stack Trace
======================================
Links (308): Links::environment called at z:/WORK/CGI-BIN/lsql/admin/Links.pm line 430
with no arguments.
Links (308): Links::fatal called at GT::Base::error line 360 with arguments
(GT::Plugins (308): Error running plugin PRE hook:
Plugins::Extended_link::Page::handle_page_pre.
Reason:
Bareword "STOP" not allowed while "strict subs" in use at
z:/WORK/CGI-BIN/lsql/admin/Plugins/Extended_link/Page.pm line 36.
Compilation failed in require at GT::Plugins::_load_hook line 261.
at GT::Plugins::_load_hook line 263.
).
Links (308): GT::Base::error called at GT::Plugins::_load_hook line 263 with arguments
(GT::Plugins=HASH(0x1c7b8e4), PLUGINERR, FATAL, PRE,
Plugins::Extended_link::Page::handle_page_pre,
Bareword "STOP" not allowed while "strict subs" in use at
z:/WORK/CGI-BIN/lsql/admin/Plugins/Extended_link/Page.pm line 36.
Compilation failed in require at GT::Plugins::_load_hook line 261.
).
Links (308): GT::Plugins::_load_hook called at z:/WORK/CGI-BIN/lsql/admin/GT/Plugins.pm
line 95 with arguments
(GT::Plugins=HASH(0x1c7b8e4), Plugins::Extended_link::Page::handle_page_pre, PRE).
Links (308): GT::Plugins::dispatch called at Z:\Work\cgi-bin\lsql\page.cgi
line 25 with arguments
(GT::Plugins, z:/WORK/CGI-BIN/lsql/admin/Plugins, handle_page, CODE(0x1a1f29c)).

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: Jun 24, 2002, 8:35 AM
Quote Reply
Re: [webmaster33] [v2.1.1] Fatal error when using STOP in plugin! In reply to
Did you import stop/continue at the top of your plugin?
Quote Reply
Re: [Paul] [v2.1.1] Fatal error when using STOP in plugin! In reply to
Uh, good idea. I think I forgot.
I will check in a minute.

UPDATE/EDIT: Yep, that was the problem.
Thanks Paul, that was good idea, suggestion!

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: Jun 24, 2002, 8:48 AM