Esteemed monks,

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?


In reply to Unable to suppress warnings using PAR-Packer on Win32 with Strawberry Perl by wojtyk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.