Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 113427
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: Nobody in particular
Requestors: PHILKIME [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Double-colon behaviour
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.
On 2016-03-29 07:19:16, PHILKIME wrote: Show quoted text
> Would be nice to be able to do: > > --module A:: > > 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
On Tue Mar 29 07:54:16 2016, RSCHUPP wrote: Show quoted text
> On 2016-03-29 07:19:16, PHILKIME wrote:
Show quoted text
> 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.
On 2016-03-29 12:37:38, PHILKIME wrote: Show quoted text
> 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
On 2016-03-31 05:33:49, RSCHUPP wrote: Show quoted text
> is good for :) So I just added the following option to pp: > > =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