Re: Can't locate loadable object for module Tk::Event





Sisyphus wrote:
> <balu422@xxxxxxxxx> wrote in message
> Perl can't find the Parse_Date() subroutine. Where is it ? If it's a
> Tk::Event subroutine, then calling it as Tk::Event::Parse_Date(), instead of
> simply Parse_Date(), should fix the problem. Alternatively, you could import
> it - by loading Tk::Event with:
> use Tk::Event qw(Parse_Date);

Thanks for taking time to relply me. use Date::Calc qw(Parse_Date); is
already defined and still the browser is complaining that. My program
is as follows:

#!/usr/local/bin/perl


use CGI::Carp qw(fatalsToBrowser);
$ENV{'PATH'} = '/bin:/usr/bin:/usr/ucb';


@capodichino = ();
@vienna = ();
@vaihingen = ();
@kelly = ();
@wheeler = ();
@yokota = ();
@yydata = ();


use Chart::Plot;
use CGI qw (:standard);
use CGI::Carp qw(fatalsToBrowser);
use Chart::Lines;
use Date::Calc qw(Parse_Date);
use Date::Calc qw(Add_Delta_Days);
use Date::Calc qw(Delta_Days);
use AAA_UTILS;


$bad_input = 0;


$bad_input = 0;
$empty_flag = 0;
$visit = 0;
$xdata_flag = 0;
$last_xdata = 0;
$start_str_time = "";
$error = 0;
$yesterday = -1;
$yesterday2 = -2;
$select_header = 0;


main: {
$access_handle = AAA_UTILS->new();
Init();
page_starter();


if ( $q->param('Systems') =~ /Current month/) {
Current_month_form();


} elsif ( $q->param('Systems') =~ /Ad hoc/) {
adhoc_search_form();


adhoc_search_form();


} else { empty_form(); }



};


sub Init
{
use CGI;

$q=new CGI;


@start_month = qw (01 02 03 04 05 06 07 08 09 10 11 12);
@end_month = qw (01 02 03 04 05 06 07 08 09 10 11 12);
$default_option = "Incident Reports";
$default_system = "System Reports";



}


sub page_starter()
{
print $q->header;
print $q->start_html(-title=>'AAA System Reports',
-bgcolor => "#FFFFFF"
);


}


sub empty_form() {

$empty = "Date";
local($user) = $ENV{'REMOTE_USER'};


$user_value = $user_table{$user};


print qq!


<h1 align="center"><font color="green">
AAA System Reports
</font></h1>


<h2 align="center">
System Reports provide performance information.
</h2>


<br> <a href="aaamain.cgi?Systems=Curr­ent+month"
target="_blank">Current Month.</a>
<br> <a href="aaamain.cgi?Systems=Ad+h­oc"
target="_blank">AAA server events Ad hoc.</a>


<br>


<br> Previous Month for AAA server events Activity Reports -
Event activity is provided for:


<br>


<br> <a href="hotlink.cgi?Systems=AAA1­" target="_blank">
AAA server events by hour.</a>


<br> <a href="hotlink.cgi?Systems=AAA2­" target="_blank">
AAA server events by Communications Server.</a>


<br> <a href="hotlink.cgi?Systems=AAA3­" target="_blank">
AAA server events by Communications Server by hour.</a>


<br> <a href="hotlink.cgi?Systems=AAA4­" target="_blank">
<br> <a href="hotlink.cgi?Systems=AAA4­" target="_blank">
Communications Server Port Report</a> - All activity at CS
ports.


!;



}


sub Current_month_form()
{
$empty = "Date";
Init_aaa();

($year1,$month1,$day1) = Parse_Date($access_handle->Sys­tem_date());

($year2, $month2, $day2) = Add_Delta_Days($year1, $month1, $day1,
$yesterday);
($year3, $month3, $day3) = Add_Delta_Days($year1, $month1, $day1,
$yesterday2)
;
@a = (
$q->start_form(
-action => 'aaa.cgi'
),
$q->popup_menu(
-name => 'AaaServerActivity', -values => [@activity_lists]
),
-name => 'AaaServerActivity', -values => [@activity_lists]
),
$q->popup_menu(
-name => 'ServerName', -values => [@server_lists]
),
$q->popup_menu(
-name => 'options', -values => [@options], -default=>
$default_option
),
$q->popup_menu(
-name => 'ReportType', -values => [@report_lists]
),
$q->submit(
-name => 'GetHistoricalData', -value=>'Get Report'),
$q->end_form()
);


printf <<EOM, @a;
<center><h1><b><font color="#008200">Current Month
Activities</font></b></h1></c
enter>
<table border = 1 CELLSPACING=0 CELLPADDING=4 align = center bgcolor =

"white"
width=75%>
%s
<tr>
<td><i><b>AAA Server Activity</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>


<tr>
<td><i><b>Server</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>


<tr>
<td><i><b>Period</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>


<tr>
<td><i><b>Report Type</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>


<tr>
<td colspan = 4 align = center>%s</td>
</tr>


</table>
EOM



}


sub adhoc_search_form()
{
$empty = "Date";
@activity_lists = ('Events by Hour', 'Events by Day');
@server_lists = ('all servers', 'aaa-capodichino', 'aaa-kelly',
'aaa-vaihingen
', 'aaa-vienna', 'aaa-wheeler', 'aaa-yokota');

($year1,$month1,$day1) = Parse_Date($access_handle->Sys­tem_date());

($year2, $month2, $day2) = Add_Delta_Days($year1, $month1, $day1,
$yesterday);
($year3, $month3, $day3) = Add_Delta_Days($year1, $month1, $day1,
-8);
if ( $month2 < 10 ) {
$month2 = "0" . $month2;
}
if ( $month3 < 10 ) {
$month3 = "0" . $month3;
}


@a = (
$q->start_form(
-action => 'adhoc.cgi'
),
$q->popup_menu(
-name => 'AaaServerActivity', -values => [@activity_lists]
),
$q->popup_menu(
-name => 'ServerName', -values => [@server_lists]
),
$q->popup_menu(
-name => 'StartMonth',
-values => [@start_month], -default=> $month2
),
$q->textfield(-name => 'StartDay', -value => $day3, -size=>2),
$q->textfield(-name => 'StartYear', -value => $year2, -size=>4),
$q->popup_menu(
-name => 'EndMonth',
-values => [@end_month], -default=> $month2
),
$q->textfield(-name => 'EndDay', -value => $day2, -size=>2),
$q->textfield(-name => 'EndYear', -value => $year2, -size=>4),
$q->submit(
-name => 'GetHistoricalData', -value=>'Get Report'),
$q->end_form()
);


printf <<EOM, @a;
<center><h1><b><font color="#008200">Ad Hoc AAA System
Reports</font></b></h1></
center>
<table border = 1 CELLSPACING=0 CELLPADDING=4 align = center bgcolor =

"white"
width=75%>
%s
<tr>
<td><i><b>AAA Server Activity</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>
<tr>
<td><i><b>Server</b></i></td>
<td colspan = 3 align = center>%s</td>
</tr>


<tr>
<td><i><b>$empty</b></i></td>
<td align = center><i><b>Month</b></i></td­>
<td align = center><i><b>Date</b></i></td>
<td align = center><i><b>Year</b></i></td>
</tr>


<tr>
<td><i><b>Start date</b></i></td>
<td align = center>%s</td>
<td align = center>%s</td>
<td align = center>%s</td>
</tr>


<tr>
<td><i><b>End date</b></i></td>
<td align = center>%s</td>
<td align = center>%s</td>
<td align = center>%s</td>
</tr>


<tr>
<td colspan = 4 align = center>%s</td>
</tr>


</table>
EOM



}


sub Init_aaa()
{
use CGI;

$q=new CGI;


@start_month = qw (01 02 03 04 05 06 07 08 09 10 11 12);
@end_month = qw (01 02 03 04 05 06 07 08 09 10 11 12);
@server_lists = ('all servers', 'aaa-capodichino', 'aaa-kelly',
'aaa-vaihingen', 'aaa-vienna', 'aaa-wheeler', 'aaa-yokota');
@options = ('previous day', 'last 7 days', 'month to date');
$default_option = "previous day";
@activity_lists = ('Events by Hour', 'Events by Day',
'Events by Communications Server', 'Events by Communications
Server by H
our');
@report_lists = ('Graph', 'Table');



}

Please let me know if there is something I am overlooking.
Thanks,

Balu

.



Relevant Pages

  • Cant locate loadable object for module Tk::Event
    ... use CGI qw; ... sub page_starter ... printf <<EOM, @a; ...
    (comp.infosystems.www.authoring.cgi)
  • Re: new in CGI::Session::Driver::postgredsql nonexisting
    ... i would suggest you turn on strict and warnings in this example.. ... or die "cannot prepare"; ... use CGI ':standard'; ... sub makeHTML ...
    (comp.lang.perl.misc)
  • perl cgi problem
    ... when i click on the submit button to add it to the cgi part it says it can ... # this copyright notice and the comments above remain intact. ... # Get the Date for Entry ... sub no_comments { ...
    (comp.lang.perl.misc)
  • Huge cgi!Help!
    ... I have an orrible trouble with this poor cgi: ... sub connetti { ... # Reads a saved CGI object from disk and returns its params as a hash ... my $id = shift; ...
    (comp.lang.perl.misc)
  • Re: DBD::ADO and Access IMAGE (OLE Object) fields...
    ... after adding an additional subroutine to export the images after ... the script still does not successfully load the data. ... eval {use CGI;}; ... sub showPicLinks { ...
    (perl.dbi.users)