Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

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

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


daniel.austin at gmail

Aug 30, 2009, 6:44 PM

Post #1 of 5 (1267 views)
Permalink
How to handle development vs production, required vs recommended module dependencies

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Sep 2, 2009, 10:44 AM

Post #2 of 5 (1184 views)
Permalink
Re: How to handle development vs production, required vs recommended module dependencies [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


onken at houseofdesign

Sep 2, 2009, 2:10 PM

Post #3 of 5 (1188 views)
Permalink
Re: How to handle development vs production, required vs recommended module dependencies [In reply to]

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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


zzbbyy at gmail

Sep 9, 2009, 1:24 PM

Post #4 of 5 (1095 views)
Permalink
Re: How to handle development vs production, required vs recommended module dependencies [In reply to]

On Mon, Aug 31, 2009 at 3:44 AM, Daniel Austin<daniel.austin [at] gmail> 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 [at] perl/msg07485.html

Cheers,

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

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


daniel.austin at gmail

Sep 10, 2009, 5:25 AM

Post #5 of 5 (1081 views)
Permalink
Re: How to handle development vs production, required vs recommended module dependencies [In reply to]

2009/9/10 Zbigniew Lukasiak <zzbbyy [at] gmail>:
>[...]
> 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 [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.