- Timestamp:
- 08/29/08 18:53:48 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
cybozu2ical/trunk/lib/WWW/CybozuOffice6/CalendarDriver/SyncCalendar.pm
r507 r512 5 5 use warnings; 6 6 7 use base qw( WWW::CybozuOffice6::CalendarDriver ); 7 8 use Carp; 8 9 use Encode qw( from_to ); 9 10 use LWP::UserAgent; 10 use DateTime;11 11 use WWW::CybozuOffice6::Calendar::Event; 12 12 use WWW::CybozuOffice6::Calendar::RecurrentEvent; 13 13 14 14 sub request { 15 my $ class= shift;15 my $driver = shift; 16 16 my ($cal) = @_; 17 17 my $date_range = $cal->{date_range} || 30; … … 39 39 40 40 sub get_items { 41 my $ class= shift;41 my $driver = shift; 42 42 my ($cal) = @_; 43 43 44 my $csv;45 if ( eval('require Text::CSV_XS') ) {46 $csv = Text::CSV_XS->new( { binary => 1 } );47 }48 elsif ( eval('require Text::CSV') ) {49 $csv = Text::CSV->new;50 }51 confess 'Text::CSV_XS or Text::CSV package is required' unless $csv;52 53 44 my @items; 45 my $csv = $driver->{csv}; 54 46 for my $line ( $cal->response ) { 55 47 $csv->parse($line)
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)