ports/99192: [MAINTAINER] net/p5-Net-Google-Calendar: Fixes empty gd:* fields in get_events() result
Yi-Hsuan Hsin
mhsin at mhsin.org
Tue Jun 20 00:30:17 UTC 2006
>Number: 99192
>Category: ports
>Synopsis: [MAINTAINER] net/p5-Net-Google-Calendar: Fixes empty gd:* fields in get_events() result
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 20 00:30:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Yi-Hsuan Hsin
>Release: FreeBSD 4.10-RELEASE-p16 i386
>Organization:
NTU CSIE
>Environment:
System: FreeBSD a.mhsin.org 4.10-RELEASE-p16 FreeBSD 4.10-RELEASE-p16 #13: Fri Jul 1 03:06:45 CST
>Description:
Fixes empty gd:* fields in get_events() result.
This is caused by an improper type casting from XML::Atom::Entry to Net::Google::Calendar::Entry.
Added file(s):
- files/patch-Entry
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
Call get_events() to get calendar events and access their gd:* fields (transparancy, visibility, status, location, and when fields of Net::Google:Calendar::Entry).
>Fix:
--- p5-Net-Google-Calendar-0.2.d_1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/net/p5-Net-Google-Calendar.orig/Makefile /usr/ports/net/p5-Net-Google-Calendar/Makefile
--- /usr/ports/net/p5-Net-Google-Calendar.orig/Makefile Mon Jun 19 15:27:55 2006
+++ /usr/ports/net/p5-Net-Google-Calendar/Makefile Tue Jun 20 02:52:35 2006
@@ -7,6 +7,7 @@
PORTNAME= Net-Google-Calendar
DISTVERSION= 0.2_devel
+PORTREVISION= 1
CATEGORIES= net perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Net
diff -ruN --exclude=CVS /usr/ports/net/p5-Net-Google-Calendar.orig/files/patch-Entry /usr/ports/net/p5-Net-Google-Calendar/files/patch-Entry
--- /usr/ports/net/p5-Net-Google-Calendar.orig/files/patch-Entry Thu Jan 1 08:00:00 1970
+++ /usr/ports/net/p5-Net-Google-Calendar/files/patch-Entry Tue Jun 20 03:14:58 2006
@@ -0,0 +1,37 @@
+diff -ur lib/Net/Google/Calendar/Entry.pm lib/Net/Google/Calendar/Entry.pm
+--- lib/Net/Google/Calendar/Entry.pm Thu Jun 15 17:42:23 2006
++++ lib/Net/Google/Calendar/Entry.pm Tue Jun 20 00:50:28 2006
+@@ -45,10 +45,19 @@
+ my ($class, %opts) = @_;
+
+ my $self = $class->SUPER::new( Version => '1.0', %opts );
+- $self->category('', { scheme => 'http://schemas.google.com/g/2005#kind', term => 'http://schemas.google.com/g/2005#event' } );
+
+- $self->{_gd_ns} = XML::Atom::Namespace->new(gd => 'http://schemas.google.com/g/2005');
++ $self->_initialize();
++
+ return $self;
++}
++
++sub _initialize
++{
++ my $self = shift;
++
++ $self->category('', { scheme => 'http://schemas.google.com/g/2005#kind', term => 'http://schemas.google.com/g/2005#event' } );
++
++ $self->{_gd_ns} = XML::Atom::Namespace->new(gd => 'http://schemas.google.com/g/2005');
+ }
+
+ =head2 id [id]
+diff -ur lib/Net/Google/Calendar.pm lib/Net/Google/Calendar.pm
+--- lib/Net/Google/Calendar.pm Tue Jun 20 01:32:37 2006
++++ lib/Net/Google/Calendar.pm Tue Jun 20 00:59:16 2006
+@@ -293,7 +293,7 @@
+ my $atom = $r->content;
+
+ my $feed = XML::Atom::Feed->new(\$atom);
+- return map { bless $_, 'Net::Google::Calendar::Entry' } $feed->entries;
++ return map { bless $_, 'Net::Google::Calendar::Entry'; $_->_initialize(); $_ } $feed->entries;
+ }
+
+
--- p5-Net-Google-Calendar-0.2.d_1.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list