r55616 - in /branches/upstream/libnet-google-code-perl/current: ./ lib/Net/Google/ lib/Net/Google/Code/ lib/Net/Google/Code/Issue/ lib/Net/Google/Code/Role/ lib/Net/Google/Code/Wiki/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Wed Apr 7 15:27:33 UTC 2010


Author: jawnsy-guest
Date: Wed Apr  7 15:27:26 2010
New Revision: 55616

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55616
Log:
[svn-upgrade] Integrating new upstream version, libnet-google-code-perl (0.18)

Modified:
    branches/upstream/libnet-google-code-perl/current/Changes
    branches/upstream/libnet-google-code-perl/current/META.yml
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Download.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Attachment.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Comment.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Util.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/HTMLTree.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/Pageable.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki.pm
    branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki/Comment.pm

Modified: branches/upstream/libnet-google-code-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/Changes?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/Changes (original)
+++ branches/upstream/libnet-google-code-perl/current/Changes Wed Apr  7 15:27:26 2010
@@ -1,4 +1,8 @@
 Revision history for Net-Google-Code
+
+0.18 Wed Apr  7 12:38:05 GMT 2010
+
+* explicitly delete HTML::TreeBuilder object
 
 0.17 Fri Jan 29 04:15:09 UTC 2010
 

Modified: branches/upstream/libnet-google-code-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/META.yml?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/META.yml (original)
+++ branches/upstream/libnet-google-code-perl/current/META.yml Wed Apr  7 15:27:26 2010
@@ -35,4 +35,4 @@
   XML::FeedPP: 0
 resources:
   license: http://dev.perl.org/licenses/
-version: 0.17
+version: 0.18

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code.pm Wed Apr  7 15:27:26 2010
@@ -4,7 +4,7 @@
 with 'Net::Google::Code::TypicalRoles';
 use Scalar::Util qw/blessed/;
 
-our $VERSION = '0.17';
+our $VERSION = '0.18';
 
 has 'project' => (
     isa      => 'Str',
@@ -94,6 +94,7 @@
 sub parse {
     my $self    = shift;
     my $tree    = shift;
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
 
     my $summary =
@@ -125,6 +126,7 @@
         push @labels, $tag->content_array_ref->[0];
     }
     $self->labels( \@labels ) if @labels;
+    $tree->delete if $need_delete;
     return 1;
 }
 
@@ -169,6 +171,7 @@
             push @wikis, $wiki;
         }
     }
+    $tree->delete;
     $self->wikis( \@wikis );
 }
 

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Download.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Download.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Download.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Download.pm Wed Apr  7 15:27:26 2010
@@ -69,6 +69,7 @@
 sub parse {
     my $self = shift;
     my $tree = shift;
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
 
     my $entry;
@@ -120,6 +121,7 @@
     if ( $checksum =~ /^SHA1 Checksum:\s+(\w+)/ ) {
         $self->checksum( $1 );
     }
+    $tree->delete if $need_delete;
 }
 
 sub BUILDARGS {

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue.pm Wed Apr  7 15:27:26 2010
@@ -124,6 +124,7 @@
     my $self    = shift;
     my $tree    = shift;
 
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
 
     # extract summary
@@ -257,7 +258,8 @@
     unshift @comments, $initial_comment;
 
     $self->comments( \@comments );
-
+    $tree->delete if $need_delete;
+    return 1;
 }
 
 sub load_comments {
@@ -276,7 +278,7 @@
 sub parse_hybrid {
     my $self    = shift;
     my $tree    = shift;
-
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
 
     my $description = $tree->look_down( class => 'vt issuedescription' );
@@ -371,7 +373,8 @@
         $initial_comment->updates->{$_} = $self->$_;
     }
     $self->comments->[0] = $initial_comment;
-
+    $tree->delete if $need_delete;
+    return 1;
 }
 
 sub _load_from_xml {

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Attachment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Attachment.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Attachment.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Attachment.pm Wed Apr  7 15:27:26 2010
@@ -25,17 +25,10 @@
 
 sub parse {
     my $self = shift;
-    my $html = shift;
-
-    my $tr;
-
-    if ( blessed $html ) {
-        $tr = $html->find_by_tag_name( 'tr' );
-    }
-    else {
-        my $tree = $self->html_tree( html => $html );
-        $tr = $tree->find_by_tag_name( 'tr' );
-    }
+    my $tree    = shift;
+    my $need_delete = not blessed $tree;
+    $tree = $self->html_tree( html => $tree ) unless blessed $tree;
+    my $tr = $tree->find_by_tag_name('tr');
 
     my $b    = $tr->find_by_tag_name('b');    # name lives here
     if ($b) {
@@ -71,12 +64,14 @@
         }
     }
 
+    $tree->delete if $need_delete;
     return 1;
 }
 
 sub parse_attachments {
     my $self    = shift;
     my $element = shift;
+    my $need_delete = not blessed $element;
     $element = $self->html_tree( html => $element ) unless blessed $element;
 
     my @attachments;
@@ -90,6 +85,7 @@
             push @attachments, $a;
         }
     }
+    $element->delete if $need_delete;
     return @attachments;
 }
 

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Comment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Comment.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Comment.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Comment.pm Wed Apr  7 15:27:26 2010
@@ -30,6 +30,7 @@
 sub parse {
     my $self    = shift;
     my $element = shift;
+    my $need_delete = not blessed $element;
     $element = $self->html_tree( html => $element ) unless blessed $element;
 
     my $author  = $element->look_down( class => 'author' );
@@ -87,12 +88,14 @@
       if $att_tag;
     $self->attachments( \@attachments );
 
+    $self->delete if $need_delete;
     return 1;
 }
 
 sub parse_hybrid {
     my $self    = shift;
     my $element = shift;
+    my $need_delete = not blessed $element;
     $element = $self->html_tree( html => $element ) unless blessed $element;
     my $updates = $element->look_down( class => 'updates' );
     if ($updates) {
@@ -127,7 +130,7 @@
       Net::Google::Code::Issue::Attachment->parse_attachments($att_tag)
       if $att_tag;
     $self->attachments( \@attachments );
-
+    $element->delete if $need_delete;
     return 1;
 }
 

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Util.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Util.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Issue/Util.pm Wed Apr  7 15:27:26 2010
@@ -59,6 +59,7 @@
                       . ( $ref->{$k}->{'#text'} || '' )
                       . '</pre>' );
                 $text = $tree->as_text if $tree;
+                $tree->delete;
             }
             else {
                 $text = $ref->{$k}->{'#text'};

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/HTMLTree.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/HTMLTree.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/HTMLTree.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/HTMLTree.pm Wed Apr  7 15:27:26 2010
@@ -28,12 +28,13 @@
     );
 
     my $tree;
-
+    my $need_delete;
     if ( blessed $args{html} ) {
         $tree = $args{html};
     }
     else {
         $tree = $self->html_tree( html => $args{html} );
+        $need_delete = 1;
     }
 
     my $part = $tree;
@@ -41,9 +42,12 @@
         ($part) = $tree->look_down( @{ $args{look_down} } );
     }
 
-    return unless $part;
 
-    my $text = $part->as_text;
+    my $text = $part && $part->as_text;
+    $tree->delete if $need_delete;
+
+    return unless defined $text;
+
     return 1 if $text eq $args{as_text};
 
     if ( ( ref $args{as_text} eq 'Regexp' ) && ( my @captures =

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/Pageable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/Pageable.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/Pageable.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Role/Pageable.pm Wed Apr  7 15:27:26 2010
@@ -21,6 +21,7 @@
 
     $args{limit} ||= 999_999_999; # the impossible huge limit
     my $tree = $args{html};
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
 
     # assuming there's at most 20 columns
@@ -84,6 +85,7 @@
         }
     }
 
+    $tree->delete if $need_delete;
     if ( scalar @rows > $args{limit} ) {
         # this happens when limit is less than the 1st page's number, so in
         # some similar situations 
@@ -105,6 +107,7 @@
         }
     );
     my $tree = $args{html};
+    my $need_delete = not blessed $tree;
     $tree = $self->html_tree( html => $tree ) unless blessed $tree;
     my @titles = @{$args{titles}};
     my $label_column = $args{label_column};
@@ -144,6 +147,7 @@
             $k++;
         }
     }
+    $tree->delete if $need_delete;
     return @rows;
 }
 

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki.pm Wed Apr  7 15:27:26 2010
@@ -112,6 +112,8 @@
         push @comments, $comment;
     }
     $self->comments( \@comments );
+    $tree->delete;
+    return 1;
 }
 
 no Any::Moose;

Modified: branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki/Comment.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki/Comment.pm?rev=55616&op=diff
==============================================================================
--- branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki/Comment.pm (original)
+++ branches/upstream/libnet-google-code-perl/current/lib/Net/Google/Code/Wiki/Comment.pm Wed Apr  7 15:27:26 2010
@@ -22,7 +22,7 @@
 sub parse {
     my $self    = shift;
     my $element = shift;
-
+    my $need_update = not blessed $element;
     $element = $self->html_tree( html => $element ) unless blessed $element;
 
     my $author =
@@ -34,6 +34,7 @@
     $self->author( $author ) if $author;
     $self->date( $date ) if $date;
     $self->content( $content ) if $content;
+    $element->delete if $need_update;
     return 1;
 }
 




More information about the Pkg-perl-cvs-commits mailing list