Re: Splitting a CPAN distribution in two

2018-09-12 Thread Fields, Christopher J
That’s essentially what we are doing for bioperl now, and it seems to work 
quite well.

chris

On September 7, 2018 at 8:42:40 PM, Konstantin S. Uvarin 
(khe...@gmail.com) wrote:

Hello,

Sorry if this has been answered before, but I couldn't find anything... How do 
I split my CPAN distro in two?

Say I have modules Foo::Core and Foo::Plugin in the same distribution, Foo. 
Over time, features accumulate and the plugin now has extra dependencies 
unneeded by most core users.

How do I make plugin a separate distribution? Just publish it as Foo::Plugin 
with a version greater than that of Foo?

Thank you,

--
Konstantin S. Uvarin
jabber: see 
skype: kuvarin
http://github.com/dallaylaen


Re: executable only Perl distributions & CPAN

2018-09-12 Thread James E Keenan

On 09/12/2018 08:02 AM, David Cantrell wrote:

On Fri, Sep 07, 2018 at 01:18:28PM -0700, Karen Etheridge wrote:

On Fri, Sep 7, 2018 at 12:59 PM, Diab Jerius  wrote:

I see two options:
1.  Create an empty package which gets indexed; or
2.  Add an entry to the "provides" field mapping the distribution's
"package" name (App::pltvectors) to the script file.

Option 1 is correct -- create an App::pltvectors module which is indexable
and installable.  However, it doesn't need to be an empty package -- not
only can it contain documentation for your script, but it could also
contain most of the functionality from the script as well, turning the
script into a wrapper that calls the module. That also allows others to
make use of the code in their own scripts.


It would also make it easier to write tests for your code - you'd be
able to load the module and call individual methods in it and check
their return values and side-effects instead of having to shell out to
the script a zillion times.



+1 to that as well!


Re: executable only Perl distributions & CPAN

2018-09-12 Thread David Cantrell
On Fri, Sep 07, 2018 at 01:18:28PM -0700, Karen Etheridge wrote:
> On Fri, Sep 7, 2018 at 12:59 PM, Diab Jerius  wrote:
> > I see two options:
> > 1.  Create an empty package which gets indexed; or
> > 2.  Add an entry to the "provides" field mapping the distribution's
> > "package" name (App::pltvectors) to the script file.
> Option 1 is correct -- create an App::pltvectors module which is indexable
> and installable.  However, it doesn't need to be an empty package -- not
> only can it contain documentation for your script, but it could also
> contain most of the functionality from the script as well, turning the
> script into a wrapper that calls the module. That also allows others to
> make use of the code in their own scripts.

It would also make it easier to write tests for your code - you'd be
able to load the module and call individual methods in it and check
their return values and side-effects instead of having to shell out to
the script a zillion times.

-- 
David Cantrell | Bourgeois reactionary pig

We found no search results for "crotchet".  Did you mean "crotch"?