Xevier_Strong has asked for the wisdom of the Perl Monks concerning the following question:

Great Monks,
I am facing problem in replacing the default icon of exe generated by pp.
When I am using the command:
">pp -o SPAT2.exe -c Main_V3.pl -a S_Parse"
SPAT2.exe is generated with camel icon.

with --icon Icon.ico added into the command line as shown below,
">pp --icon Icon.ico -o SSAT2.exe -c Main_V3.pl -a S_Parse"
I am getting the following error:
Can't locate object method "new" via package "Win32::Exe" at c:/perl/lib/PAR/Packer.pm line 1263, <$fh> line 1.

I searched the Win32\Exe.pm and not found the definition of "new" method. Although there are multiple expample of usage of
"Win32::Exe->new($filename);" in the documentation.

Can you tell me why there is no definition of "Win32::Exe->new($filename)"
and also what is missing in my case?

Replies are listed 'Best First'.
Re: Can't locate object method "new" via package "Win32::Exe"
by marto (Cardinal) on May 24, 2010 at 11:09 UTC

    Given our conversations in the CB today about this issue, could you please describe what you did to 'manually' install this module? You may also want to read the PPM documentation which explains how to configure it to work with firewalls.

Re: Can't locate object method "new" via package "Win32::Exe"
by Anonymous Monk on May 25, 2010 at 07:17 UTC
Re: Can't locate object method "new" via package "Win32::Exe"
by Xevier_Strong (Initiate) on May 26, 2010 at 09:03 UTC

    It was indeed a problem with the PAR installation. Re-installing the PAR::Packer has solved the icon problem. I used:

    CPAN> install PAR::Packer

    this installed a fresh copy of PAR. thnaks for your hint.