Milasevents has asked for the wisdom of the Perl Monks concerning the following question:

I want to use the Net::Google::Calendar Api. Whenever I start the script, it gives the this error:

Died at /usr/share/perl/5.10/base.pm line 93.
BEGIN failed--compilation aborted at XML/Atom/Feed.pm line 5.
Compilation failed in require at Net/Google/Calendar.pm line 12.
BEGIN failed--compilation aborted at Net/Google/Calendar.pm line 12.
Compilation failed in require at gcal.pl line 14.
BEGIN failed--compilation aborted at gcal.pl line 14.

What is my mistake??? Thanks for your help!

The Script:
#!/usr/bin/perl -w print "Content-Type: text/html\n\n"; use CGI; use CGI::Carp qw( fatalsToBrowser ); use Date::Calc qw(:all); use HTTP::Request::Common; use LWP::UserAgent; use Time::Local; use File::Copy; use File::Path; use PDF::Create; use DBI; use Net::Google::Calendar; use MIME::Base64 qw(encode_base64); $query = new CGI; ######### Set ######### $func = ($query->param('func')); ######### Main Routing ######### &header; if (!$func) {&main;} elsif ($func eq "main") {&main;} &footer; exit; ######### Subs ######### ######### Main ######### sub main { $username='myadress\@googlemail.com'; $password='mypassword'; $cal = Net::Google::Calendar->new; $cal->login( $username, $password ); @calendars = $cal->get_calendars; foreach $element (@calendars) { print <<HTML; $element<br/> HTML } } ######### Header ######### sub header { print <<HTML; <html> <head> <TITLE>Milas-Events</TITLE> <META NAME="Title" CONTENT="www.milas-events.de"> <META NAME="Author" CONTENT="Michael Lucassen"> <META NAME="Copyright" CONTENT="Michael Lucassen"> <META NAME="Language" CONTENT="Deutsch"> <META NAME="resource-type" CONTENT="document"> <META NAME="revisit-after" CONTENT="30 days"> <META NAME="classification" CONTENT="Info"> <META NAME="description" CONTENT="Willkommen bei www.milas-events.de"> <META NAME="keywords" CONTENT="Events, Veranstaltungstechnik, VT, DMX, + "> <META HTTP-EQUIV="Expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1 +"> <meta http-equiv="Content-Language" content="de"> </head> <body text="#000000" link="#000000" vlink="#000000" alink="#000000"> <center> HTML } ######### Footer ######### sub footer { print <<HTML; </center> </body> </html> HTML } ######### EOF #########

Replies are listed 'Best First'.
Re: Net:Google:Calender fails to run
by frozenwithjoy (Priest) on Apr 06, 2014 at 16:12 UTC
    Does it happen if you comment out the use CGI::Carp line? There's a bug report about the Died at /usr/share/perl/5.10/base.pm line 93. error related to that module. Which version of CGI/CGI::Carp are you using? If your problem results from this, it was supposedly fixed in v3.51.
Re: Net:Google:Calender fails to run
by Milasevents (Initiate) on Apr 06, 2014 at 16:57 UTC
    When I comment it out I get a 500 Internal server error!?

    And when I start it before the CGI::Carp like this, i get the same 500 error:

    #!/usr/bin/perl -w print "Content-Type: text/html\n\n"; use CGI; use Net::Google::Calendar; use CGI::Carp qw( fatalsToBrowser ); use Date::Calc qw(:all); use HTTP::Request::Common; use LWP::UserAgent; use Time::Local; use File::Copy; use File::Path; use PDF::Create; use PDF::CreateSimple; use DBI; use Geo::IP; use MIME::Base64 qw(encode_base64); $query = new CGI;

      And what does the web server error log show in that case?

      My best guess at the most likely problem is that you don't have libxml installed correctly.

      - tye        

Re: Net:Google:Calender fails to run
by karlgoethebier (Abbot) on Apr 06, 2014 at 15:38 UTC
    "Whenever I start the script..."

    Too bad ;-) But what script do you start?

    Please provide more details. See also How do I post a question effectively?.

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»