How to handle development vs production, required vs recommended module dependencies

View: New views
5 Messages — Rating Filter:   Alert me  

How to handle development vs production, required vs recommended module dependencies

by Daniel Austin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I'm curious how other Catalyst developers are managing their CPAN
module dependencies.

I see our current application as having four types of module dependencies:

* Modules that are required for the application to run *at all*. These
are specified using "requires" statements in Makefile.PL (and also,
the "all from" statement which points at the main Catalyst application
class).

* Modules that are not required, but if present, add additional
functionality. These are specified using "recommends" statements in
the Makefile.PL.

* Modules that are only needed by developers.
 -- Some of these are just needed for testing (eg HTML validator) so I
use "test_requires". That seems to work fine but I don't get prompted
"Do you want to permanently install these" which is what I was
expecting for some reason.
-- Others, like Catalyst::Devel are needed for any kind of development
and not just to run tests. But they're not needed for production and
should not be a dependency. I specify these using "requires" but I
have it inside an "if block" which checks the command line to see if
Makefile.PL is being run for a developer or not.

* Finally, there are modules which are recommended for developers but
not required (for example, Devel::Cover for code coverage). I specify
these using "recommends", but again it's inside the same if block
described above.

Interested to hear how others might be handling this. It seems to work
for us but I'm still learning Module::Install.

Thanks

Dan

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: How to handle development vs production, required vs recommended module dependencies

by Tomas Doran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 31 Aug 2009, at 02:44, Daniel Austin wrote:
> Interested to hear how others might be handling this. It seems to work
> for us but I'm still learning Module::Install.

I tend to use the excellent Module::Install::AuthorRequires and  
Module::Install::AuthorTests - as things which are not required will  
not be installed / run on the author side, so in my opinion you get  
less hassle by just requiring everything for authors who are checking  
the code out of revision control.

Cheers
t0m


_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: How to handle development vs production, required vs recommended module dependencies

by Moritz Onken :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Am 02.09.2009 um 19:44 schrieb Tomas Doran:

>
> On 31 Aug 2009, at 02:44, Daniel Austin wrote:
>> Interested to hear how others might be handling this. It seems to  
>> work
>> for us but I'm still learning Module::Install.
>
> I tend to use the excellent Module::Install::AuthorRequires and  
> Module::Install::AuthorTests - as things which are not required will  
> not be installed / run on the author side, so in my opinion you get  
> less hassle by just requiring everything for authors who are  
> checking the code out of revision control.

Or create a second distribution MyApp::Devel which contains the devel  
modules only.

moritz

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: How to handle development vs production, required vs recommended module dependencies

by Zbigniew Lukasiak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Aug 31, 2009 at 3:44 AM, Daniel Austin<daniel.austin@...> wrote:

> Hello
>
> I'm curious how other Catalyst developers are managing their CPAN
> module dependencies.
>
> I see our current application as having four types of module dependencies:
>
> * Modules that are required for the application to run *at all*. These
> are specified using "requires" statements in Makefile.PL (and also,
> the "all from" statement which points at the main Catalyst application
> class).
>
> * Modules that are not required, but if present, add additional
> functionality. These are specified using "recommends" statements in
> the Makefile.PL.

I am against "additional functionalities" and "recommended"
dependencies.   If this additional functionality is really useful -
then you can expect someone will write something depending on it and
at that point the whole automatic install idea breaks down.

See also: http://www.mail-archive.com/module-authors@.../msg07485.html

Cheers,

--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: How to handle development vs production, required vs recommended module dependencies

by Daniel Austin-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/9/10 Zbigniew Lukasiak <zzbbyy@...>:
>[...]
> I am against "additional functionalities" and "recommended"
> dependencies.

I've been thinking about it and I think you're right, at least for our
apps at our company.

I've also realised that the 'recommended' directive actually doesn't
work at all. I might have misunderstood something in Module::Install
but those recommended modules never get installed or asked for.

I'm checking out Module::Install::AuthorRequires as suggested by t0m.
Then there will be only two kinds of modules: modules you need to run
the app and modules developers need to test it.

Thanks for the suggestions everyone.

Dan

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/