Milasevents has asked for the wisdom of the Perl Monks concerning the following question:
#!/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 | |
|
Re: Net:Google:Calender fails to run
by Milasevents (Initiate) on Apr 06, 2014 at 16:57 UTC | |
by tye (Sage) on Apr 06, 2014 at 17:49 UTC | |
|
Re: Net:Google:Calender fails to run
by karlgoethebier (Abbot) on Apr 06, 2014 at 15:38 UTC |