wojtyk has asked for the wisdom of the Perl Monks concerning the following question:
I've installed Strawberry Perl on my Windows 7 machine and was able to successfully install both PAR::Packer and Net::SNMP (with the intent of packing snmpenum.pl into a stand-alone executable). However, I then came to the realization that running snmpenum.pl under Strawberry Perl bombards me with the following warning spam: "Use of :locked is deprecated at Net/SNMP.pm line XXXX". The only way I was able to successfully mute this spam was by replacing the "-w" with a "-X" in my initial snmpenum.pl perl declaration line. I was content with this solution until I ran it through pp. The resulting binary that was produced ignored my -X flag and still produced the flurry of warnings. All attempts to suppress this spam beyond the declaration line have failed (I've tried "no warnings", "$^W = 0", and various other warning suppression techniques to no avail)
Does anyone know what is causing this aberrant behavior? In UNIX, the warnings aren't even generated, so I don't need the "-X" flag.
On Windows, the warnings are generated despite the fact it is the exact same version of the Net::SNMP library. However, these can be suppressed with "-X"
On Windows, in a "pp-packed" executable, I've found no way to suppress these warnings.
If anyone could point me in the right direction, it would be much appreciated. Am I missing something glaringly obvious?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to suppress warnings using PAR-Packer on Win32 with Strawberry Perl
by ww (Archbishop) on May 19, 2010 at 00:42 UTC | |
by wojtyk (Friar) on May 19, 2010 at 17:51 UTC | |
|
Re: Unable to suppress warnings using PAR-Packer on Win32 with Strawberry Perl
by syphilis (Archbishop) on May 19, 2010 at 00:54 UTC | |
by Anonymous Monk on Jul 19, 2010 at 07:42 UTC | |
by Anonymous Monk on Jul 19, 2010 at 07:52 UTC | |
|
Re: Unable to suppress warnings using PAR-Packer on Win32 with Strawberry Perl
by Anonymous Monk on May 18, 2010 at 23:02 UTC | |
by wojtyk (Friar) on May 18, 2010 at 23:47 UTC |