Re: [Catalyst] how do you distribute a catalyst app

2009-06-12 Thread Hans Dieter Pearcey
On Fri, Jun 12, 2009 at 08:43:08AM +0300, Octavian Rasnita wrote:
 Could it be possible to use local::lib and specify that I want to skip the
 tests for the current module?

This also doesn't have anything to do with local::lib.  Look for 'notest' in
the CPAN.pm docs.

(This is a potentially bad idea for all the same reasons 'force' is.)

local::lib has nothing to do with how CPAN.pm behaves.  Any questions you have
about how can I do X while using CPAN.pm should be looked up in the CPAN.pm
documentation.

local::lib sets environment variables that Module::Build and
ExtUtils::MakeMaker use to determine what directory they should go into, and
for perl to add extra paths to @INC, and corresponding variables for both
inside a Perl process that you use it in.  That's all.  You seem to have the
impression that it touches much more than it actually does, and I think you'll
be less confused and have an easier time answering your own questions if you
understand local::lib's scope.

hdp.

___
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] how do you distribute a catalyst app

2009-06-11 Thread Octavian Râşniţă
From: Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.netOn Wed, 
Jun 10, 2009 at 10:33:26PM +0300, Octavian Râşniţă wrote:

 When using this syntax, where can I specify the local path where I want
 to install the Some::Module?



You never do that with local::lib.  It sets up the env variables for you
(PERL_MM_OPT and MODULEBUILDRC) -- CPAN.pm doesn't know anything about it.
hdp.


I read in the POD of local::lib that I can specify the local path where the 
modules are installed ('my_lwp'):


 # Install LWP and it's missing dependencies to the 'my_lwp' directory
 perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'

When using this syntax for installing modules in the directory 'my_lwp' I 
don't know how I can specify the force parameter of the cpan shell.


Thanks.

Octavian




___
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] how do you distribute a catalyst app

2009-06-11 Thread Tomas Doran

Octavian Râşniţă wrote:
When using this syntax for installing modules in the directory 'my_lwp' 
I don't know how I can specify the force parameter of the cpan shell.


perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::force(qw/install LWP/)'

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] how do you distribute a catalyst app

2009-06-11 Thread Octavian Râşniţă

From: Tomas Doran bobtf...@bobtfish.net
Octavian Râşniţă wrote:
When using this syntax for installing modules in the directory 'my_lwp' I 
don't know how I can specify the force parameter of the cpan shell.


perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::force(qw/install LWP/)'

Cheers
t0m

Thank you. local::lib seems to work fine, but not always:

 perl -MCPAN -Mlocal::lib=support -e CPAN::install(HTML::FormFu)

The result:

Database was generated on Thu, 11 Jun 2009 17:08:37 GMT
HTML::FormFu is up to date (0.05000).

But HTML::FormFu is not installed under the support path.

Sometimes I succeed to install some of the modules if I add the 
parameter --self-contained, but sometimes I can't because some dependencies 
are not installed automaticly, or some modules give very many errors like 
the case of Moose:


Failed 185/213 test programs. 20/536 subtests failed.

(This error is given when I try to install Moose using the standard cpan 
command line also.)


Octavian 



___
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] how do you distribute a catalyst app

2009-06-11 Thread Hans Dieter Pearcey
On Thu, Jun 11, 2009 at 09:23:41PM +0300, Octavian Râşniţă wrote:
  perl -MCPAN -Mlocal::lib=support -e CPAN::install(HTML::FormFu)

 The result:

 Database was generated on Thu, 11 Jun 2009 17:08:37 GMT
 HTML::FormFu is up to date (0.05000).

 But HTML::FormFu is not installed under the support path.

Because it's already installed somewhere else, and you didn't use
--self-contained.

 Failed 185/213 test programs. 20/536 subtests failed.

 (This error is given when I try to install Moose using the standard cpan  
 command line also.)

This isn't an error, this is a summary.  No one can help you fix the problem if
all you give is the summary instead of the actual error log.  Nopaste, or
attach, or something?

hdp.

___
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] how do you distribute a catalyst app

2009-06-11 Thread Octavian Râşniţă

From: Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net

Failed 185/213 test programs. 20/536 subtests failed.

(This error is given when I try to install Moose using the standard cpan
command line also.)


This isn't an error, this is a summary.  No one can help you fix the problem 
if

all you give is the summary instead of the actual error log.  Nopaste, or
attach, or something?
hdp.

I discovered the problem. Moose requires a newer version of Class::MOP than 
the one I had it installed.


I don't know why cpan didn't try to install the newer version, because I've 
seen that the newer version was required in the Makefile.PL.


But now installs fine after manually installing Class::MOP.

Octavian


___
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] how do you distribute a catalyst app

2009-06-11 Thread Hans Dieter Pearcey
On Thu, Jun 11, 2009 at 10:46:49PM +0300, Octavian Râşniţă wrote:
 I discovered the problem. Moose requires a newer version of Class::MOP 
 than the one I had it installed.

 I don't know why cpan didn't try to install the newer version, because 
 I've seen that the newer version was required in the Makefile.PL.

 But now installs fine after manually installing Class::MOP.

CPAN.pm using CPAN::SQLite had some inconsistent behavior with following
dependencies until the last version or so.  Maybe you got bit by this?

hdp.

___
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] how do you distribute a catalyst app

2009-06-11 Thread Octavian Rasnita

From: Hans Dieter Pearcey hdp.perl.catalyst.us...@weftsoar.net
On Thu, Jun 11, 2009 at 10:46:49PM +0300, Octavian Râşniţă wrote:

I discovered the problem. Moose requires a newer version of Class::MOP
than the one I had it installed.

I don't know why cpan didn't try to install the newer version, because
I've seen that the newer version was required in the Makefile.PL.

But now installs fine after manually installing Class::MOP.


CPAN.pm using CPAN::SQLite had some inconsistent behavior with following
dependencies until the last version or so.  Maybe you got bit by this?
hdp.

Aha, that might be the problem because I installed that plugin for CPAN that
uses a local database.

I tried for more times to install the newer version  of CPAN, but each time
I've done this, CPAN gave errors when trying to install a module with it, so
I let the version that came with the ActivePerl distribution.

Anyway, I found another problem that disallow me to install some modules
with CPAN. Some tests stop the execution and wait forever.
In cases like this I used to install the ppm version of those modules, but
now if I want to use local::lib I need to manually install those modules and
specify the prefix when doing perl Makefile.PL.

Could it be possible to use local::lib and specify that I want to skip the
tests for the current module?

Octavian


___
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] how do you distribute a catalyst app

2009-06-10 Thread Tomas Doran

Patricio A. Bruna wrote:
wich methods do you use to distribute a catalyst application from on box 
to another.
and suposse this box has diferent operating system, i ment one has suse 
and the other redhat.

what are you recomendations


Don't do that.

Having an app balanced across two totally dissimilar boxes is going to 
cause you more issues than across two similar boxes, so I'd just avoid 
it if possible.


If not possible, then I guess distro style packages of all your 
dependencies would be the way to go.


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] how do you distribute a catalyst app

2009-06-10 Thread Patricio A. Bruna
Maybe i explain wrong. 
I did not mean load balance, i meant deployment. 
i develop my app on my box, and then i need to deploy it on the production 
server, with the same operating system. downloading all the modules from cpan 
is time consuming, are any better way? 


 
Patricio Bruna V. 
IT Linux Ltda. 
http://www.it-linux.cl 
Fono : (+56-2) 333 0578 
IT Linux en Facebook 


- Tomas Doran bobtf...@bobtfish.net escribió: 
 Patricio A. Bruna wrote: 
  wich methods do you use to distribute a catalyst application from on box 
  to another. 
  and suposse this box has diferent operating system, i ment one has suse 
  and the other redhat. 
  what are you recomendations 
 
 Don't do that. 
 
 Having an app balanced across two totally dissimilar boxes is going to 
 cause you more issues than across two similar boxes, so I'd just avoid 
 it if possible. 
 
 If not possible, then I guess distro style packages of all your 
 dependencies would be the way to go. 
 
 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] how do you distribute a catalyst app

2009-06-10 Thread Tomas Doran

Patricio A. Bruna wrote:

Maybe i explain wrong.
I did not mean load balance, i meant deployment.
i develop my app on my box, and then i need to deploy it on the 
production server, with the same operating system. downloading all the 
modules from cpan is time consuming, are any better way?


Yes.

Use a self contained local::lib. Bootstrap local::lib (see the docs), 
then, from inside your MyApp directory:


eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib--self-containted,local_lib)
make installdeps

And you'll then have all the dependencies for your app (given you listed 
them in Makefile.PL) built for you, inside your app directory, where you 
can add them to revision control.


I generally have a per-app local::lib, and a couple of trivial shell 
scripts I put in the scripts/ directory which can give you a shell with 
the environment setup correctly to see this local::lib etc..


Then pushing a new version of your application (and all your 
dependencies) is just a case of rsyncing your app up to your web server :)


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] how do you distribute a catalyst app

2009-06-10 Thread Hans Dieter Pearcey
On Wed, Jun 10, 2009 at 08:14:10PM +0300, Octavian Râşniţă wrote:
 BTW, regarding local::lib, does anyone know how can I force install a 
 module that gives an error under Windows when I use it?

The same way you force install anything using the CPAN shell.

CPAN force install Some::Module

hdp.

___
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] how do you distribute a catalyst app

2009-06-10 Thread Octavian Râşniţă

From: Tomas Doran bobtf...@bobtfish.net

Patricio A. Bruna wrote:

Maybe i explain wrong.
I did not mean load balance, i meant deployment.
i develop my app on my box, and then i need to deploy it on the 
production server, with the same operating system. downloading all the 
modules from cpan is time consuming, are any better way?


Yes.

Use a self contained local::lib. Bootstrap local::lib (see the docs), 
then, from inside your MyApp directory:


eval 
$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib--self-containted,local_lib)

make installdeps

And you'll then have all the dependencies for your app (given you listed 
them in Makefile.PL) built for you, inside your app directory, where you 
can add them to revision control.


I generally have a per-app local::lib, and a couple of trivial shell 
scripts I put in the scripts/ directory which can give you a shell with 
the environment setup correctly to see this local::lib etc..


Then pushing a new version of your application (and all your dependencies) 
is just a case of rsyncing your app up to your web server :)


Cheers
t0m



I think it could be very helpful to add these details on the Deployment 
page of the wiki.


BTW, regarding local::lib, does anyone know how can I force install a module 
that gives an error under Windows when I use it?


Thanks.

Octavian




___
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] how do you distribute a catalyst app

2009-06-10 Thread Octavian Râşniţă
From: Stuart Watt 
  Why would you do that? If the module you're installing fails its tests, you 
should file a bug report. What kind of error? IME you shouldn't ever want to or 
need to force install a module. This should be a *colossal* red flag to you. 

  ...

  /joel 

  It is very possible that the tests fail because the tests are wrong, not the 
module. I use a Perl that does not have fork emulation on Windows, partly for 
performance. Many tests assume fork, even where the modules they are testing do 
not depend on it. Yes, these modules should be reported, but you don't need to 
wait for a new release, nor is the module necessarily compromised. Authors 
cannot always test on a wide range of platforms. I find a good few modules fail 
tests for system/platform reasons rather than because of bugs in the code. 

  Modules I know fail on Windows without fork but generally don't care include: 
DBD::mysql, Test::NoWarnings, WWW::Mechanize, HTTP::Server::Simple, 
Cache::Cache, and DBD::SQLite. Most of these have tests that assume fork. Some 
get caught by file system differences and permissions differences. 

  You might have a wider concern if you are using a standard build (if such a 
thing exists) but it is at least sometimes justifiable to look through the 
tests that fail and make a judgment call. 

  --S

  -- 
  Stuart Watt
  ARM Product Developer
  Information Balance


  Hi,



  Sometimes I see that I can't install some perl modules, but then I found a 
ppm package  that can be installed, and that module has the same version as the 
ones I couldn't install using the cpan shell.



  So probably the tests are done wrong.



  Some tests (like the one for DBD::SQLite) also crash the perl interpreter, 
not only that the tests don't succeed.



  And as you said, most of the tests use fork and then I know why they are not 
working under Windows.



  If we need to deploy a Catalyst app under Linux, is not so hard to install 
modules from CPAN using the cpan shell, but it might be very hard to install 
some modules under Windows, so it would be very good if we could use local::lib 
to pre-install the necessary modules.



  And regarding my question, in local::lib's POD, I read that:



  From the shell -

perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'



  Where in this command line can I add the force parameter, or is there 
another way of installing perl modules in the local directory?



  And, another question:

  Can we deploy an app that uses local::lib without having shell access but 
only ftp access if local::lib is not installed?

  (It would be interesting to know, although I never needed it until now.)



  Thanks.



  Octavian




___
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] how do you distribute a catalyst app

2009-06-10 Thread Hans Dieter Pearcey
On Wed, Jun 10, 2009 at 10:33:26PM +0300, Octavian Râşniţă wrote:
 When using this syntax, where can I specify the local path where I want 
 to install the Some::Module?

You never do that with local::lib.  It sets up the env variables for you
(PERL_MM_OPT and MODULEBUILDRC) -- CPAN.pm doesn't know anything about it.

hdp.

___
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/