Discussion:
[rt.cpan.org #113427] Double-colon behaviour
(too old to reply)
Philip Kime via RT
2016-03-29 11:19:17 UTC
Permalink
Tue Mar 29 07:19:16 2016: Request 113427 was acted upon.
Transaction: Ticket created by PHILKIME
Queue: PAR-Packer
Subject: Double-colon behaviour
Broken in: (no value)
Severity: Normal
Owner: Nobody
Requestors: ***@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=113427 >


Would be nice if possible to have the "double-colon" behaviour apply even if there is no top-level module. I have things like:

A::B
A::C
A::D

but no

A.pm

Would be nice to be able to do:

--module A::

in such cases too.
Roderich Schupp via RT
2016-03-29 11:54:18 UTC
Permalink
Tue Mar 29 07:54:16 2016: Request 113427 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Double-colon behaviour
Broken in: (no value)
Severity: Normal
Owner: Nobody
Requestors: ***@cpan.org
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=113427 >
Post by Philip Kime via RT
in such cases too.
An empty A.pm should do the trick :) (at least if all A::X modules are located
in the same directory .../A).
And far less work than to implement this in PAR::Packer.

Cheers, Roderich
Philip Kime via RT
2016-03-29 16:37:39 UTC
Permalink
Tue Mar 29 12:37:38 2016: Request 113427 was acted upon.
Transaction: Correspondence added by PHILKIME
Queue: PAR-Packer
Subject: Double-colon behaviour
Broken in: (no value)
Severity: Normal
Owner: Nobody
Requestors: ***@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=113427 >
Post by Roderich Schupp via RT
An empty A.pm should do the trick :) (at least if all A::X modules are
located
in the same directory .../A).
And far less work than to implement this in PAR::Packer.
Ok, it's not a big thing, just a bit neater in the build scripts ... you can close this.
Roderich Schupp via RT
2016-03-31 09:33:56 UTC
Permalink
Thu Mar 31 05:33:49 2016: Request 113427 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Double-colon behaviour
Broken in: (no value)
Severity: Normal
Owner: Nobody
Requestors: ***@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=113427 >
Post by Philip Kime via RT
Ok, it's not a big thing, just a bit neater in the build scripts ...
After looking at Module::Loader, your usecase is probably not uncommon.
Also I understand now what ActiveState's perlapp option "--add Module::**"
is good for :) So I just added the following option to pp:

=item B<-N>, B<--namespace>=I<NAMESPACE>

Add all modules in the namespace into the package,
along with their dependencies. If C<NAMESPACE> is something like C<Foo::Bar>
then this will add all modules C<Foo/Bar/Quux.pm>, C<Foo/Bar/Fred/Barnie.pm> etc
that can be located in your module search path. It mimics the behaviour
of "plugin" loaders like L<Module::Loader>.

This is different from using C<-M Foo::Bar::>, as the latter insists
on adding C<Foo/Bar.pm> which might not exist in the above "plugin" scenario.

You may specify C<-N> multiple times.



Cheers, Roderich
Roderich Schupp via RT
2016-04-06 12:34:41 UTC
Permalink
Wed Apr 06 08:34:34 2016: Request 113427 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: PAR-Packer
Subject: Double-colon behaviour
Broken in: (no value)
Severity: Normal
Owner: Nobody
Requestors: ***@cpan.org
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=113427 >
Post by Roderich Schupp via RT
=item B<-N>, B<--namespace>=I<NAMESPACE>
Strike that! I just implemented the notations

-M Foo:: (unchanged)
-M Foo::*
-M Foo::**

used by ActiveState's perlapp (cf.
http://docs.activestate.com/pdk/6.0/PerlApp.html#perlapp__2d_2dadd_modules,
note that their option "--add" is our "--module"), will be in the next release.

Your usecase should then be served by "-M Foo::**".

Cheers, Roderich

Loading...