Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-22 Thread Jonathan Rockway
* On Thu, Apr 16 2009, James R. Leu wrote:
> I must have missed the memo about PAR not being recommend.  Is there a
> discussion thread I can read about it?

I think this is just t0m's personal opinion.

Anyway, the code for catalyst_par is very very flaky.  Keep this in mind
as you use it.  If the PAR you produce works, it will work, and it's a
good way to deploy.  If it doesn't work, then some hacks are needed to
get it working.  I plan on improving this situation in the future,
although in a somewhat roundabout way (so it's not going to be fixed
next week, but maybe next year).  The basic idea is to start the
application to the point where it is about to serve a request, snapshot
%INC, and then use that as the list of modules to bundle.  This fixes
most cases of lazy-loaded modules not being bundled with the PAR, but
not all of them.  (Another option that I have not tried is to not
auto-detect which modules to load, and instead take them from the
Makefile.PL.  That way, if a module is not available, It's Your Faultâ„¢.
You can emulate this behavior with the existing code, however.)

Oh yeah, I am also thinking of ways to bundle your test suite with the
PAR, and easily run them from the deployed PAR.  That will alleviate
many of my PAR deployment worries.

(Ping me on IRC for more details, or see
http://github.com/jrockway/moosex-runnable )

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

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


Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-18 Thread Tomas Doran


On 17 Apr 2009, at 03:21, kakim...@tpg.com.au wrote:


Quoting Tomas Doran :



  How do you guys get your PAR files made?


We don't. PAR isn't a recommended deployment method these days.



K. akimoto:  Really?? i would really suggest someone to the mention of
it out of the Catalyst cookbook in
http://search.cpan.org/~hkclark/Catalyst-Manual-5.7020/lib/Catalyst/ 
Manual/Cookbook.pod#Quick_deployment:_Building_PAR_Packages.



Or more - it shouldn't be taken away, as it is still viable, but  
there should be more docs on a local::lib approach, and that should  
be recommended over PAR.


This has been noted, and will happen.

Cheers
t0m


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


Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-16 Thread kakimoto

> Tomas,
> 
> I must have missed the memo about PAR not being recommend.  Is there
> a discussion thread I can read about it?


Thank you, James! Yes, I would like to read more about the discussion
thread (if it exists).
Interesting..


K. akimoto

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


Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-16 Thread kakimoto
Quoting Tomas Doran :

> 
> On 16 Apr 2009, at 06:57, kakim...@tpg.com.au wrote:
> 
> >
> >
> > Hi there,
> >  I refered to http://catalyst.infogami.com/cookbook/par. I can't  
> > seem to
> > find the line,
> > "catalyst_files();".
> 
> I don't know what you're talking about - as that phrase isn't  
> mentioned anywhere in that document.


K. akimoto:  It is there. Please look under the title, "Add these lines
to Makefile.PL (below "catalyst_files();")".


> 
> >   How do you guys get your PAR files made?
> 
> We don't. PAR isn't a recommended deployment method these days.
> 

K. akimoto:  Really?? i would really suggest someone to the mention of
it out of the Catalyst cookbook in 
http://search.cpan.org/~hkclark/Catalyst-Manual-5.7020/lib/Catalyst/Manual/Cookbook.pod#Quick_deployment:_Building_PAR_Packages.



> > I assume that par files will get the new server which I want to  
> > install
> > my application to launch CPAN shell to install the extra modules
> it
> > needs?
> 
> No. This idea of a PAR file is that it contains all the dependencies 
> 
> already.
> 
> The recommended solution is to build a local::lib with all your  
> dependencies in, and keep this in revision control / ship it with the
>  
> rest of your application.


 k.akimoto: I like this idea! Damn, should have considered this earlier.
Ah well, i will save it for my next projects.


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




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


Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-16 Thread James R. Leu
Hello Tomas and kakimoto,

Please see my response inline..

On Thu, Apr 16, 2009 at 08:46:15AM +0100, Tomas Doran wrote:
>
> On 16 Apr 2009, at 06:57, kakim...@tpg.com.au wrote:
>
>>
>>
>> Hi there,
>>  I refered to http://catalyst.infogami.com/cookbook/par. I can't seem 
>> to
>> find the line,
>> "catalyst_files();".
>
> I don't know what you're talking about - as that phrase isn't mentioned 
> anywhere in that document.
>
>>   How do you guys get your PAR files made?
>
> We don't. PAR isn't a recommended deployment method these days.

Tomas,

I must have missed the memo about PAR not being recommend.  Is there
a discussion thread I can read about it?

kakimoto,

Here is a sample of my Makefile.PL

requires 'FCGI';
requires 'Email::Valid';
requires 'YAML';
requires 'Data::Dumper';
requires 'FCGI::ProcManager';
requires 'DateTime::Format::MySQL';

catalyst_ignore('README.*', 'redhat', 'make-rpm');
catalyst_par_classes(
'FCGI',
'Email::Valid',
'YAML',
'Data::Dumper',
'FCGI::ProcManager',
'DateTime::Format::MySQL',
);

I had to explicitly add the listed class to get them included in my PAR.
The rest of the required classes were picked up via dependencies.
The ignore list is for the files that I have in my tree tree that I do
not want added to the PAR.  

>> I assume that par files will get the new server which I want to  
>> install
>> my application to launch CPAN shell to install the extra modules it
>> needs?
>
> No. This idea of a PAR file is that it contains all the dependencies  
> already.
>
> The recommended solution is to build a local::lib with all your  
> dependencies in, and keep this in revision control / ship it with the  
> rest of your application.
>
> Cheers
> t0m
>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

-- 
James R. Leu
j...@mindspring.com


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


Re: [Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-16 Thread Tomas Doran


On 16 Apr 2009, at 06:57, kakim...@tpg.com.au wrote:




Hi there,
 I refered to http://catalyst.infogami.com/cookbook/par. I can't  
seem to

find the line,
"catalyst_files();".


I don't know what you're talking about - as that phrase isn't  
mentioned anywhere in that document.



  How do you guys get your PAR files made?


We don't. PAR isn't a recommended deployment method these days.

I assume that par files will get the new server which I want to  
install

my application to launch CPAN shell to install the extra modules it
needs?


No. This idea of a PAR file is that it contains all the dependencies  
already.


The recommended solution is to build a local::lib with all your  
dependencies in, and keep this in revision control / ship it with the  
rest of your application.


Cheers
t0m


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


[Catalyst] PAR file - can't build it . Prolly documentation is out of date?

2009-04-15 Thread kakimoto


Hi there,
 I refered to http://catalyst.infogami.com/cookbook/par. I can't seem to
find the line,
"catalyst_files();".
  How do you guys get your PAR files made?

I assume that par files will get the new server which I want to install
my application to launch CPAN shell to install the extra modules it
needs?   



thank you.


This is my Makefile.pm


-
use inc::Module::Install;

name 'myApp';
all_from 'lib/myApp.pm';

requires 'Catalyst::Runtime' => '5.7012';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::Action::RenderView';
requires 'parent';
requires 'YAML'; # This should reflect the config file format you've chosen
 # See Catalyst::Plugin::ConfigLoader for supported formats
catalyst;
catalyst_par_core();   # Include modules that are also included
   # in the standard Perl distribution,
   # this is optional but highly suggested

catalyst_par();# Generate a PAR as soon as the blib
   # directory is ready


install_script glob('script/*.pl');
auto_install;
WriteAll;
-

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