Mon May 24 17:27:05 2010: Request 55994 was acted upon.
Transaction: Correspondence added by DJIBEL
       Queue: PAR-Packer
     Subject: Can't call method "remove" on an undefined value at 
C:/Perl/site/lib/Win32/Exe.pm line 220.
   Broken in: 1.002
    Severity: Critical
       Owner: Nobody
  Requestors: [email protected]
      Status: open
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55994 >


Sorry, that is the real patch.

Best Regards,

Djibril
--- C:/Perl/site/lib/PAR/Packer_old.pm  Mon May 24 23:23:44 2010

+++ C:/Perl/site/lib/PAR/Packer_new.pm  Mon May 24 23:23:56 2010

@@ -3,7 +3,7 @@

 use strict;

 use warnings;

 

-our $VERSION = '1.004';

+our $VERSION = '1.005';

 

 =head1 NAME

 

@@ -821,6 +821,9 @@

             and 0 # XXX - broken on larger icon files - XXX

         ) {

             my $tkdll = Win32::Exe->new($map{$pfile});

+            if ($^O eq 'MSWin32') {

+                $tkdll = $tkdll->create_resource_section if 
!$tkdll->has_resource_section;

+            }

             my $ico = Win32::Exe::IconFile->new($opt->{i});

             $tkdll->set_icons(scalar $ico->icons);

 

@@ -1260,10 +1263,21 @@

     }

     elsif (eval { require Win32::Exe; 1 }) {

         $self->_move_parl();

-        Win32::Exe->new($self->{parl})->update(

-            icon => $opt->{i},

-            info => $opt->{N},

-        );

+        if ($^O eq 'MSWin32') {

+            my $exe = Win32::Exe->new($self->{parl});

+            $exe = $exe->create_resource_section if 
!$exe->has_resource_section;

+            $exe->update(

+                icon => $opt->{i},

+                info => $opt->{N},

+            );

+            $exe->write;

+        }

+        else {

+            Win32::Exe->new($self->{parl})->update(

+                icon => $opt->{i},

+                info => $opt->{N},

+            );

+        }        

 

         $self->_append_parl();

         $self->_generate_output();

Reply via email to