Hi David,

Thanks for suggestion. I thought it would be a natural thing to
match /package (\S+) .*? $VERSION/, so it won't hit wrong package if
there's a pattern (like in my case) "package A ... $VERSION ... package B".

/dk

On Tue, Jul 26, 2011 at 10:04:38AM -0400, David Golden wrote:
> Hi, Dmitry.
> 
> The PAUSE indexer scans the code without executing the Perl (which
> would be a security risk), so it's just looking for a pattern like
> "package Foo::Bar" and then failing to find "$VERSION = ..."
> afterwards.  You can obscure a package by putting a carriage return
> after 'package' and before the namespace:
> 
>     package
>         Prima::Drawable;  # hide from PAUSE
> 
> It's a quirky hack, but works.
> 
> -- David
> 
> On Mon, Jul 25, 2011 at 2:19 PM, Dmitry Karasik <dmi...@karasik.eu.org> wrote:
> > Hello kind CPAN people,
> >
> > I've got a minor problem with pause indexer, may I interest you
> > to look at it, it seems that if a file contains "package" like twice,
> > the indexer is confused:
> >
> > Status: Decreasing version number
> > =================================
> >
> >     module: Prima::Drawable
> >    version: undef
> >    in file: Prima-1.31/Prima/Classes.pm
> >     status: Not indexed because Prima-OpenGL-0.01/lib/Prima/OpenGL.pm
> >             in K/KA/KARASIK/Prima-OpenGL-0.01.tar.gz has a higher
> >             version number (0.01)
> >
> > ----- End forwarded message -----
> >
> > OpenGL.pm does some magick inside Prima::Drawable, but its $VERSION is 
> > defined
> > before "package Prima::Drawable". Not that its really bad, but annoying. If 
> > you
> > could take a look at that, could be great! Thanks!
> >
> > --
> > Sincerely,
> >        Dmitry Karasik
> >
> >

-- 
Sincerely,
        Dmitry Karasik

Reply via email to