Ok well I got it, but for a while I 'thought' I wasn't doing something right
In ZipCodeSearch.pm, I have
use lib '';
use Links qw/$PLG/;
use Plugins::ZipCodeSearch;
local $SIG{__DIE__} = \&Links::fatal;
Links::init();
Links::init_user();
if ($PLG->dispatch('check_request', \&Links::check_request)) {
$PLG->dispatch('handle_ZipCodeSearch', \&Plugins::ZipCodeSearch::handle);
}
And I get this error when running 'perl check' on the module.
Can't locate Plugins/ZipCodeSearch.pm in @INC (@INC contains:
/home/virtual/site129/fst/var/www/cgi-bin/links_dev/admin /usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at zipcode_search.cgi line 14.
BEGIN failed--compilation aborted at zipcode_search.cgi line 14.
Line 13 is use lib'';
I am doing proper substitutions in Install.pm for the 'path/to/admin' for use lib and Links::init().
Of course when running the perl check it can't find the PM file, because it isn't installed yet.
And the "Empty compile Time" error I have always ignored too.
For completeness, in ZipCodeSearch.pm, I have
# ==================================================================
use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/:objects/;
use Links::Plugins;
use GT::Config;
use Links::Tools;
use Plugins::ZipCodeSearch;
# Inherit from base class for debug and error methods
@Plugins::ZipCodeSearch::ISA = qw(GT::Base);
# Your code begins here.
my $pi = atan2(1,1) * 4;
my $time_hires;
sub handle {
#--------------------------------------------------------------------------------
#
my $args = $IN->get_hash;
...
}
So am I just suppossed to ignore the compile error when doing 'perl check'?
Sorry guys, I am trying to get it right.
What do these 2 lines do?
@Plugins::ZipCodeSearch::ISA = qw(GT::Base);
With that I should have a complete understanding.
Thanks
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com
In ZipCodeSearch.pm, I have
Code:
use strict; use lib '';
use Links qw/$PLG/;
use Plugins::ZipCodeSearch;
local $SIG{__DIE__} = \&Links::fatal;
Links::init();
Links::init_user();
if ($PLG->dispatch('check_request', \&Links::check_request)) {
$PLG->dispatch('handle_ZipCodeSearch', \&Plugins::ZipCodeSearch::handle);
}
And I get this error when running 'perl check' on the module.
Quote:
Empty compile time value given to use lib at zipcode_search.cgi line 13 Can't locate Plugins/ZipCodeSearch.pm in @INC (@INC contains:
/home/virtual/site129/fst/var/www/cgi-bin/links_dev/admin /usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at zipcode_search.cgi line 14.
BEGIN failed--compilation aborted at zipcode_search.cgi line 14.
Line 13 is use lib'';
I am doing proper substitutions in Install.pm for the 'path/to/admin' for use lib and Links::init().
Of course when running the perl check it can't find the PM file, because it isn't installed yet.
And the "Empty compile Time" error I have always ignored too.
For completeness, in ZipCodeSearch.pm, I have
Code:
package Plugins::ZipCodeSearch; # ==================================================================
use strict;
use GT::Base;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/:objects/;
use Links::Plugins;
use GT::Config;
use Links::Tools;
use Plugins::ZipCodeSearch;
# Inherit from base class for debug and error methods
@Plugins::ZipCodeSearch::ISA = qw(GT::Base);
# Your code begins here.
my $pi = atan2(1,1) * 4;
my $time_hires;
sub handle {
#--------------------------------------------------------------------------------
#
my $args = $IN->get_hash;
...
}
So am I just suppossed to ignore the compile error when doing 'perl check'?
Sorry guys, I am trying to get it right.
What do these 2 lines do?
Code:
use CGI::Carp qw(fatalsToBrowser); @Plugins::ZipCodeSearch::ISA = qw(GT::Base);
With that I should have a complete understanding.
Thanks
Chris
RGB World, Inc. - Software & Web Development.
rgbworld.com