local our works

Yes, it works without warnings provided there is no our inside the do block. But that our comes from the external module being examined (Capture::Tiny in my examples), and when that our is present a warning is generated:

18:47 >perl 1513_SoPW.pl "our" variable $VERSION redeclared at (eval 1) line 4. (Did you mean "local" instead of "our"?) Version: desired_version 18:47 >p5u v Capture::Tiny Capture::Tiny "our" variable $VERSION redeclared at (eval 49) line 7, <MOD> line 6. (Did you mean "local" instead of "our"?) C:\Perl\Strawberry\strawberry-perl-5.22.1.1-64bit-PDL\perl\ven +dor\lib\Capture\Tiny.pm: 0.30 18:47 >

Thanks for the links. I’ve read 'our' is not 'my'; local our $var; What does it do? is interesting, but local our wouldn’t be suitable as a patch, anyway, because (judging by the use 5.006 pragma) Module::Info is intended to be backwards-compatible as far back as Perl 5.6.

Cheers,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


In reply to Re^2: Bug in Module::Info? our vs. use vars (local our) by Athanasius
in thread Bug in Module::Info? our vs. use vars by Athanasius

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.