Mon May 24 17:22:37 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 >


Le Lun 24 Mai 2010 16:33:41, DJIBEL a écrit :
> Dear, 
> 
> Win32::exe have been updated and problem with icon have been resolved :
> https://rt.cpan.org/Public/Bug/Display.html?id=57013.
> 
> When We would have an update of PAR::Packer module ?
> 
> Best regards,
> 
> Djibril 

Dear,

I have write a patch to PAR::PAcker. For New Win32::Exe module, Exe need
a resource section.

That is a patch to PAR::Packer 1.004
=====================================================
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '1.005';
+our $VERSION = '1.004';
 
 =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();
=====================================================

For makefile.PL, 

Win32::Exe requires  'Win32::Exe'        => 0.14;


Best Regards,

Djibril (djibel cpan)

Reply via email to