Re: [Catalyst] can't seem to install local::lib in dreamhost

2009-06-23 Thread kakimoto


 If all you tell us about is that you did it wrong, you're just going
 to be told
 to do it right.  You can avoid this by actually telling us everything
 you did
 in your first email:
 


the same error came up denying me access to run make install.

Here's how my installation looked like.
 Thanks for helping:)

- ExtUtils::MakeMaker ...missing. (would need 6.31)
- ExtUtils::CBuilder  ...loaded. (0.18)
- ExtUtils::ParseXS   ...loaded. (2.15)
- ex  ...missing. (would need 0.28)
- CPAN...missing. (would need 1.80)



[apocalypse]$ ./Build install --install_base  /home/anexiole/projects/lib



CPAN-1.94/distroprefs/MSERGEANT.AxKit.yml
CPAN-1.94/distroprefs/AUDREYT.Module-Signature.yml
[snip]
CPAN-1.94/distroprefs/RRWO.Graphics-ColorNames.yml
CPAN-1.94/distroprefs/JSHIRLEY.Catalyst-Action-REST.yml
CPAN-1.94/distroprefs/KNORR.Net-MirrorDir.yml
^CN-1.94/t/12cpan.t
Uncompressed
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar.gz
successfully
Using Tar:/bin/tar xvf
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar:
^CCouldn't untar
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar

^C^C
[apocalypse]$
[apocalypse]$
[apocalypse]$
[apocalypse]$ pwd
/home/anexiole/manual_installs/local-lib-1.001000
[apocalypse]$
[apocalypse]$ perl Makefile.PL --bootstrap
[apocalypse]$ setscreen
-bash: setscreen: command not found
[apocalypse]$ screen
#   '/usr/bin/perl -Mblib -MSimple -we print
Simple::version()
# '
# doesn't match '(?-xism:0.01$)'
Can't load '/tmp/MB-Nr3bn2Ct/Simple/blib/arch/auto/Simple/Simple.so' for
module Simple: /tmp/MB-Nr3bn2Ct/Simple/blib/arch/auto/Simple/Simple.so:
failed to map segment from shared object: Operation not permitted at
/usr/lib/perl/5.8/DynaLoader.pm line 225.
 at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.
t/xs..NOK 7
#   Failed test in t/xs.t at line 62.
#   '/usr/bin/perl -Mblib -MSimple -we print
Simple::xs_version()
# '
# doesn't match '(?-xism:0.01$)'
t/xs..ok 10/23Can't load
'/tmp/MB-Nr3bn2Ct/Simple/blib/arch/auto/Simple/Simple.so' for module
Simple: /tmp/MB-Nr3bn2Ct/Simple/blib/arch/auto/Simple/Simple.so: failed
to map segment from shared object: Operation not permitted at
/usr/lib/perl/5.8/DynaLoader.pm line 225.
 at t/basic.t line 4
Compilation failed in require at t/basic.t line 4.
BEGIN failed--compilation aborted at t/basic.t line 4.
# Looks like your test died before it could output anything.
t/xs..NOK 11
#   Failed test in t/xs.t at line 83.
#  got: 'Failed 1/1 test scripts, 0.00% okay. 2/2 subtests
failed, 0.00% okay.
# '
# expected: ''
Can't load
'/tmp/MB-Nr3bn2Ct/Simple-With-Deep-Name/blib/arch/auto/Simple/With/Deep/Name/Name.so'
for module Simple::With::Deep::Name:
/tmp/MB-Nr3bn2Ct/Simple-With-Deep-Name/blib/arch/auto/Simple/With/Deep/Name/Name.so:
failed to map segment from shared object: Operation not permitted at
/usr/lib/perl/5.8/DynaLoader.pm line 225.
 at t/basic.t line 4
Compilation failed in require at t/basic.t line 4.
BEGIN failed--compilation aborted at t/basic.t line 4.
# Looks like your test died before it could output anything.
Format STDOUT_TOP redefined at (eval 105) line 1.
Format STDOUT redefined at (eval 106) line 1.
Failed 1/1 test scripts, 0.00% okay. 2/2 subtests failed, 0.00% okay.
# Looks like you planned 23 tests but only ran 17.
# Looks like you failed 5 tests of 17 run.
# Looks like your test died just after 17.
t/xs..dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-7, 11, 18-23
Failed 11/23 tests, 52.17% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
---
t/compat.t 1   256   1311   0.76%  113
t/xs.t   255 6528023   17  73.91%  4-7 11 18-23
3 tests and 12 subtests skipped.
Failed 2/30 test scripts, 93.33% okay. 12/1022 subtests failed, 98.83% okay.
  EWILHELM/Module-Build-0.33.tar.gz
  ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports EWILHELM/Module-Build-0.33.tar.gz
Running Build install
  make test had returned bad status, won't install without force
*** Module::Build installation failed.
*** Module::AutoInstall installation finished.
Checking if your kit is complete...
Looks good
Warning: prerequisite ExtUtils::MakeMaker 6.31 not found. We have 6.3001.
Warning: prerequisite Module::Build 0.28 not found. We have 0.26.
'INSTALL_BASE' is not a known MakeMaker parameter name.
Writing Makefile for local::lib



mak



[apocalypse]$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl -MExtUtils::Command::MM -e
test_harness(0, 'inc', 'blib/lib', 'blib/arch') t/classmethod.t
t/pipeline.t
t/classmethod.t .. 1/? Name File::Spec::rel2abs used only once:
possible typo at t/classmethod.t line 20.
Attempting to create directory t/var/splat
Attempting 

Re: [Catalyst] can't seem to install local::lib in dreamhost

2009-06-23 Thread Tomas Doran


On 23 Jun 2009, at 07:17, kakim...@tpg.com.au wrote:





If all you tell us about is that you did it wrong, you're just going
to be told
to do it right.  You can avoid this by actually telling us everything
you did
in your first email:




the same error came up denying me access to run make install.

Here's how my installation looked like.
 Thanks for helping:)

- ExtUtils::MakeMaker ...missing. (would need 6.31)
- ExtUtils::CBuilder  ...loaded. (0.18)
- ExtUtils::ParseXS   ...loaded. (2.15)
- ex  ...missing. (would need 0.28)
- CPAN...missing. (would need 1.80)



[apocalypse]$ ./Build install --install_base  /home/anexiole/ 
projects/lib




Huh? Your shell prompt doesn't make it clear what module this Build  
is for.





CPAN-1.94/distroprefs/MSERGEANT.AxKit.yml
CPAN-1.94/distroprefs/AUDREYT.Module-Signature.yml
[snip]
CPAN-1.94/distroprefs/RRWO.Graphics-ColorNames.yml
CPAN-1.94/distroprefs/JSHIRLEY.Catalyst-Action-REST.yml
CPAN-1.94/distroprefs/KNORR.Net-MirrorDir.yml
^CN-1.94/t/12cpan.t
Uncompressed
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar.gz
successfully
Using Tar:/bin/tar xvf
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar:
^CCouldn't untar
/home/anexiole/.cpan/sources/authors/id/A/AN/ANDK/CPAN-1.94.tar



Huh? What is installing CPAN here? This is nowhere near a full log..


^C^C
[apocalypse]$
[apocalypse]$
[apocalypse]$
[apocalypse]$ pwd
/home/anexiole/manual_installs/local-lib-1.001000
[apocalypse]$
[apocalypse]$ perl Makefile.PL --bootstrap


Where is the output from Makefile.PL - is there really none?

From this point on in the log shows you doing something completely  
different, then coming back to run make install.


Can you rm -rf your ~/perl5, and give us a full untrimmed log of  
bootstrapping local::lib _only_, as documented with the _FULL  
OUTPUT_, and without random other stuff.


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 to use local::lib

2009-06-23 Thread Tobias Kremer
On Mon, Jun 22, 2009 at 7:04 PM, Tomas Doranbobtf...@bobtfish.net wrote:
 On 22 Jun 2009, at 16:43, Tobias Kremer wrote:
 Am I missing something here or do I really have to checkout my app on
 a fresh installation with no prerequisites installed and try the above
 there?
 Yeah, pretty much at the moment. If you install all your prerequisites in a
 local::lib, then if you blank PERL5LIB, then it _just works_.
 Also, am I right that this method won't work for XS-based modules if
 I'm building my local_lib, say on a Ubuntu system, while the
 production system is Debian-based?
 Correct. You'll have to build your local::lib on a system with similar
 architecture to your production boxen.

These things make the local::lib approach a bit more unappealing for
us. For one thing, it appears to be still quite a bit rough around the
edges and I doubt that there's anything I personally could do about it
because my knowledge there is limited. Secondly, we really would like
to have a central repository for our development AND production
systems. What proven alternatives are there if you have developers
working on OS X, Ubuntu etc. and deploy on a different (Debian)
system?

What about CPAN::Mini? At first, it sounds strange to have a whole
copy of the CPAN around (although it's not that big), but then again
it sounds really cool to just make installdeps and have everything
installed in the correct version in a cross-platform compatible way.

By the way: Would it theoretically be possible to install specific
versions of a CPAN distribution? Is there possibly already work
underway to achieve this? I think that this would really solve a lot
of deployment trouble ...

So, how are you doing your deployment? :) I believe this is an area
where there's still a lot of homebrew stuff going on and it would be
nice to have one (or 2-3) ways to do it! I'd be willing to write
something up for the wiki if there's enough input.

Thanks a lot!

--Tobias

___
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 to use local::lib

2009-06-23 Thread Tomas Doran


On 23 Jun 2009, at 08:59, Tobias Kremer wrote:

These things make the local::lib approach a bit more unappealing for
us. For one thing, it appears to be still quite a bit rough around the
edges and I doubt that there's anything I personally could do about it
because my knowledge there is limited. Secondly, we really would like
to have a central repository for our development AND production
systems. What proven alternatives are there if you have developers
working on OS X, Ubuntu etc. and deploy on a different (Debian)
system?


Erm, well, the new --self-contained feature is a little rough round  
the edges, sure.


local::lib itself just works given what it was originally trying to  
accomplish.


I think you need a better separation between development and staging.  
If you're not running something production like in staging, then IMO  
you're really screwed.


Developers can then use what they like (and whatever OS/versions of  
modules) they want, if they want to install the app locally, but  
that's unsupported. I'd also make a 'production like' (i.e. same OS)  
vmware machine available with the 'standard' dependencies - all of  
your developers should be given enough horsepower to run vmware,  
problem solved.



What about CPAN::Mini? At first, it sounds strange to have a whole
copy of the CPAN around (although it's not that big), but then again
it sounds really cool to just make installdeps and have everything
installed in the correct version in a cross-platform compatible way.


Yes, you can just point an ftp server at a CPAN::Mini, then set your  
CPAN shell to use that as your CPAN mirror - it'll just work..



By the way: Would it theoretically be possible to install specific
versions of a CPAN distribution? Is there possibly already work
underway to achieve this? I think that this would really solve a lot
of deployment trouble ...


Erm, it's already practically possible. You just need to ask the CPAN  
shell for a specific revision.




So, how are you doing your deployment? :) I believe this is an area
where there's still a lot of homebrew stuff going on and it would be
nice to have one (or 2-3) ways to do it! I'd be willing to write
something up for the wiki if there's enough input.


At work I debian package everything. But you're still going to make  
one package per dependency per platform.


That's a lot of work.. And it totally precludes having different  
applications with different versions of the same module on the same  
machine.


I guess this comes down to how many environments you're prepared to  
'officially' support, and what your constraints are.


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] Re: ajax character encoding issue solved, but WHY?

2009-06-23 Thread Aristotle Pagaltzis
* seasproc...@gmail.com seasproc...@gmail.com [2009-06-23 03:00]:
 Thanks for your suggestion, but I'm pretty sure that the data
 is not getting encoded twice. C::V::JSON tests the data before
 it encodes ( Encode::is_utf8() ) and only encodes if this test
 is true. This test only passes if the data is decoded.

Augh! Augh! Why do people keep reading stuff into the UTF8 flag
that it doesn’t mean. (Yeah, I know why, because it’s called the
UTF8 flag when it should’ve been the UOK flag or something.) You
can have decoded data with the UTF8 flag off, and you can have
encoded data with the UTF8 flag on. The UTF8 flag is about the
internals-level format of the byte buffer of a scalar, it has
nothing to do with the meaning of the data on the Perl level.
Testing the flag in pure-Perl code is an almost certain sign of
brokenness.

 My suspicion is that I don't really understand what's happening
 inside sqlite -- I assume it's storing as UTF-8, but I don't
 really know what it's doing.

Try Devel::Peek to examine the strings that come out of it?

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.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 to use local::lib

2009-06-23 Thread Tobias Kremer
On Tue, Jun 23, 2009 at 10:26 AM, Tomas Doranbobtf...@bobtfish.net wrote:
 I think you need a better separation between development and staging. If
 you're not running something production like in staging, then IMO you're
 really screwed.

Actually, we do :)

 Developers can then use what they like (and whatever OS/versions of modules)
 they want, if they want to install the app locally, but that's unsupported.
 I'd also make a 'production like' (i.e. same OS) vmware machine available
 with the 'standard' dependencies - all of your developers should be given
 enough horsepower to run vmware, problem solved.

Yes, that'd be possible. Nevertheless, it would be nice if you could
bring up a new development box with make installdeps that just
works because it has the right module versions installed and not some
new, probably incompatible version.

 By the way: Would it theoretically be possible to install specific
 versions of a CPAN distribution? Is there possibly already work
 underway to achieve this? I think that this would really solve a lot
 of deployment trouble ...
 Erm, it's already practically possible. You just need to ask the CPAN shell
 for a specific revision.

Cool, but what I really meant to ask was: Is it possible to require a
specific version in your Makefile.PL and have only this version
installed during make installdeps? :) This would possibly solve most
of the CPAN-related deployment problems.

 At work I debian package everything. But you're still going to make one
 package per dependency per platform.
 That's a lot of work.. And it totally precludes having different
 applications with different versions of the same module on the same machine.

I tried that with Catalyst::Runtime a couple of weeks ago and it still hurts :)

Thanks for your help!

--Tobias

___
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] Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu

2009-06-23 Thread Kiffin Gish
On Mon, 2009-06-22 at 21:50 +0100, Ash Berlin wrote:
 On 22 Jun 2009, at 19:50, Kiffin Gish wrote:
 
  I'm using Test::WWW::Mechanize::Catalyst to test my Catalyst App, more
  specifically the process for registering new user accounts.
 
  The application form is generated by  
  Catalyst::Controller::HTML::FormFu
  with the expected fields: username, password, confirm_password, email
  and the submit = 'Register' button (indicator).
 
  When using the good ol' browser the form is submitted and an email  
  sent
  for validation, no problem.
 
  However, making the exact same call with  
  Test::WWW::Mechanize::Catalyst
  as follows:
 
  my $fields = {
 username = $username,
 password = $password,
 confirm_password = $password,
 password_hint = $password_hint,
 email = $email,
 submit = 'Register'
  };
 
  $mech-submit_form(
 form_number = 0,
 fields = $fields,
  );
 
  will not work because within the sub register : Global FormConfig of  
  my
  controller, $form-submitted_and_valid is returning false for some  
  weird
  reason.
 
  I tried debugging the HTML::FormFu stuff but this is all very
  complicated.
 
  Can anyone help me here?
 
 I'm guessing HTML::FormFu determines that the form is submitted by the  
 value of the input from the submit button (rather that it just being a  
 post request which is my personal preference)
 
 To get WWW::Mechanize to send this value do, call
 
 
 $mech-submit_form(
  with_fields = $fields,
  button = 'submit' # or what ever the name attr of the submit  
 button is.
 );

This didn't help me, any other ideas? 

How can use the value returned by $form-has_errors() or something
similar and log the errors for trouble-shooting?

 
 ___
 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/
-- 
Kiffin Gish kiffin.g...@planet.nl
Gouda, The Netherlands



___
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] can't seem to install local::lib in dreamhost

2009-06-23 Thread Arjuna Del Toso
On Tue, 23 Jun 2009 13:33:01 +1000
kakim...@tpg.com.au wrote:

 hi guys
 
  I refered to http://www.catalystframework.org/calendar/2007/8 to
 install local::lib into my dreamhost account.
 
 I downloaded the tar file for local-lib and extracted it to a place in
 my home dir.
 In changed into the directory that local-lib contents lived in.
 I ran perl Makefile.PL --bootstrap PREFIX=/home/kakimoto -- went OK
 I ran make  test -- went OK
 I ran make install and this is the error I got:
 
 
 [apocalypse]$ make install
 mkdir /usr/local/lib/perl: Permission denied at
 /usr/share/perl/5.8/ExtUtils/Install.pm line 112
 make: *** [pure_site_install] Error 13
 [apocalypse]$
 
 HEL!!

If you just need Catalyst on Dreamhost I managed to install it
following these instructions
http://wiki.dreamhost.com/Catalyst
have a nice day,
arjuna


 
 ___
 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 to use local::lib

2009-06-23 Thread Tomas Doran


On 23 Jun 2009, at 09:41, Tobias Kremer wrote:
Developers can then use what they like (and whatever OS/versions  
of modules)
they want, if they want to install the app locally, but that's  
unsupported.
I'd also make a 'production like' (i.e. same OS) vmware machine  
available
with the 'standard' dependencies - all of your developers should  
be given

enough horsepower to run vmware, problem solved.


Yes, that'd be possible. Nevertheless, it would be nice if you could
bring up a new development box with make installdeps that just
works because it has the right module versions installed and not some
new, probably incompatible version.


Aha, well, the obvious correct solution to that is to spin up and  
install your environment dependencies with the latest CPAN  
$everything on a nightly basis, and run your smoke tests, then yell  
at CPAN authors whos newer module broke your code..


If you're not doing something similar (even if more informally), then  
you can get into big issues in a couple of years trying to reuse any  
modern code (or upgrade something due to a bug) - it has newer  
dependencies, and you can't upgrade, and suddenly you're in a nasty  
place...


I totally appreciate the need to have a 'known environment' for  
production, but at least testing newer CPAN releases automatically is  
very worthwhile..



Cool, but what I really meant to ask was: Is it possible to require a
specific version in your Makefile.PL and have only this version
installed during make installdeps? :) This would possibly solve most
of the CPAN-related deployment problems.


No, unfortunately it isn't..

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] Test::WWW::Mechanize::Catalyst and Catalyst::Controller::HTML::FormFu

2009-06-23 Thread Kiffin Gish
On Tue, 2009-06-23 at 13:05 +0200, Kiffin Gish wrote:
 On Mon, 2009-06-22 at 21:50 +0100, Ash Berlin wrote:
  On 22 Jun 2009, at 19:50, Kiffin Gish wrote:
  
   I'm using Test::WWW::Mechanize::Catalyst to test my Catalyst App, more
   specifically the process for registering new user accounts.
  
   The application form is generated by  
   Catalyst::Controller::HTML::FormFu
   with the expected fields: username, password, confirm_password, email
   and the submit = 'Register' button (indicator).
  
   When using the good ol' browser the form is submitted and an email  
   sent
   for validation, no problem.
  
   However, making the exact same call with  
   Test::WWW::Mechanize::Catalyst
   as follows:
  
   my $fields = {
  username = $username,
  password = $password,
  confirm_password = $password,
  password_hint = $password_hint,
  email = $email,
  submit = 'Register'
   };
  
   $mech-submit_form(
  form_number = 0,
  fields = $fields,
   );
  
   will not work because within the sub register : Global FormConfig of  
   my
   controller, $form-submitted_and_valid is returning false for some  
   weird
   reason.
  
   I tried debugging the HTML::FormFu stuff but this is all very
   complicated.
  
   Can anyone help me here?
  
  I'm guessing HTML::FormFu determines that the form is submitted by the  
  value of the input from the submit button (rather that it just being a  
  post request which is my personal preference)
  
  To get WWW::Mechanize to send this value do, call
  
  
  $mech-submit_form(
   with_fields = $fields,
   button = 'submit' # or what ever the name attr of the submit  
  button is.
  );
 
 This didn't help me, any other ideas? 
 
 How can use the value returned by $form-has_errors() or something
 similar and log the errors for trouble-shooting?

Hold, it DID work after all (slight over-site on my part). Thanks alot
for the tip!
 
  
  ___
  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/
-- 
Kiffin Gish kiffin.g...@planet.nl
Gouda, The Netherlands



___
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] can't seem to install local::lib in dreamhost

2009-06-23 Thread Gerda Shank

kakim...@tpg.com.au wrote:

hi guys

 I refered to http://www.catalystframework.org/calendar/2007/8 to
install local::lib into my dreamhost account.

I downloaded the tar file for local-lib and extracted it to a place in
my home dir.
In changed into the directory that local-lib contents lived in.
I ran perl Makefile.PL --bootstrap PREFIX=/home/kakimoto -- went OK
I ran make  test -- went OK
I ran make install and this is the error I got:


[apocalypse]$ make install
mkdir /usr/local/lib/perl: Permission denied at
/usr/share/perl/5.8/ExtUtils/Install.pm line 112
make: *** [pure_site_install] Error 13
[apocalypse]$

  


I recently installed local::lib on Dreamhost and had a lot of problem, 
many - but not all - of which were caused by the fact that they kept 
killing my CPAN install processes. I saved at least a partial log, and 
this is probably what caused his problem:


-
[lakers]$ perl Makefile.PL --bootstrap
Attempting to create directory /home/gshank/perl5
Attempting to create file /home/gshank/perl5/.modulebuildrc
ExtUtils::MakeMaker version 6.31 required--this is only version 6.30_01.
BEGIN failed--compilation aborted.
CPAN version 1.8 required--this is only version 1.7602.
BEGIN failed--compilation aborted.
Prototype mismatch: sub ExtUtils::MakeMaker::prompt ($;$) vs none at -e 
line 9.


/home/gshank/.cpan/CPAN/MyConfig.pm initialized.


After which it  tried to use CPAN to install ExtUtils::MakeMaker. Which 
didn't work, of course.


I downloaded and installed it myself by hand in the perl5/lib/perl5 
directory I think. As I recall, I also had to do that with 
Module::Build. Then eventually it got half installed and I and updated 
my .bashrc myself and then...  evenutally I got it all working. I had 
weird problems with CPAN too. I had to end up installing a lot of the 
modules myself.


Gerda Shank






___
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 to use local::lib

2009-06-23 Thread Dave Rolsky

On Tue, 23 Jun 2009, Tobias Kremer wrote:


Cool, but what I really meant to ask was: Is it possible to require a
specific version in your Makefile.PL and have only this version
installed during make installdeps? :) This would possibly solve most
of the CPAN-related deployment problems.


FWIW, Module::Build does support this sort of specificity:

  prereqs = { 'Test::More', '== 0.55',
   'Moose',  ' 0.81, != 0.82',
 }


-dave

/*
http://VegGuide.org   http://blog.urth.org
Your guide to all that's veg  House Absolute(ly Pointless)
*/

___
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] Warnings when upgrading Catalyst

2009-06-23 Thread Ovid

- Original Message 

 From: Tomas Doran bobtf...@bobtfish.net
 
 On 22 Jun 2009, at 10:26, Ovid wrote:
 
  
  Nobody has a clue on this one?  I've no idea how the relative values get 
  set 
 and I'm not looking forward to a long slog through the guts of Catalyst to 
 understand what's happening here :)
 
 I'm guessing that Catalyst is (incorrectly) trying to collect stats for the 
 private actions, or something similar.
 
 I'd recommend you bisect backwards through the various CPAN releases and find 
 where it was introduced.
 
 There is a detailed changelog, and I'd guess any releases mentioning 'stats' 
 are 
 worth testing either side of.
 
 I guess you can get the issue down to a release, or maybe even a specific 
 revision (git bisect for the win!), without having to attack the Catalyst 
 code 
 at all.
 
 I'd also guess that you're seeing the warning due to something 'non-standard' 
 your app is doing with logging / stats collection in general. If that stuff 
 is 
 easy to identify - try just extracting that, one controller and a simple test 
 out into a standalone test app.. Or branch and start removing your 
 application 
 (shoot the model and views, remove the code from the controllers leaving just 
 the stubs etc) - shouldn't take long to get down to a minimal app..
 
 Either way, I'd recommend trying to narrow down your issue with one or both 
 of 
 these techniques, rather than randomly trawling through the cat-guts..

I had to randomly trawl through the cat-guts. Paring down our rather large 
application is not easy and I wasn't aware of a git repository for git bisect.  
I *did* wind up downloading various CPAN releases and got it down to this:

5.7* distributions do not issue the warning.

5.8005_05 to 5.80002 were failing with:

  (Could not load class (PIPs) because : Can't call method reverse on an 
undefined 
  value at 
/home/ovid/pips_dev/work/Pips3/branches/rights_modeling/Catalyst-Runtime-5.80001/
 \
  lib/Catalyst/DispatchType/Chained.pm line 115.)

Earlier 5.8* series were failing with various errors.

In short, it's been tough for me to nail down when the failure occurs because 
different versions of Catalyst have different dependencies and it's tough to 
grab all at once and set up a good environment.

In the meantime, the warning thrown by Catalyst-_stats_start_execute() still 
remains.  You mentioned a guess that it was trying to collect stats on private 
attributes and the check for that is the first line:

  return if ( ( $code-name =~ /^_.*/ )
 ( !$c-config-{show_internal_actions} ) );

The $code-name when we get the warning is 'default', so I'm assuming it's not 
considered a private action.  When we get to the actual section of code which 
issues the warning (line 1561 in the cpan distribution)

if ( my $parent = $c-stack-[-1] ) {
$c-stats-profile(
begin  = $action,
parent = $parent . $c-counter-{$parent},  # 1561
uid= $uid,
);
}
else {

# forward with no caller may come from a plugin
$c-stats-profile(
begin = $action,
uid   = $uid,
);
}

The $action is '- /import/response/default' and we go to here from the sub 
Catalyst::Dispatcher::_do_forward() and it's the forwarding which triggers this 
bit of the stats profiling.  I just don't know enough about what is supposed to 
happen here to give better information.  Sorry for being so darned vague :(  

Note that if we check to see if $c-counter-{$parent} is defined (again, 
$parent stringifies to api/v1/promotion/_ACTION, in case it's relevant) and 
if not, switch to the else {}, this warning will go away.  I don't know, 
however, if this is the right thing to do, particularly since I can't write a 
test for this.  Phooey.

Cheers,
Ovid
--
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog- http://use.perl.org/~Ovid/journal/
Twitter  - http://twitter.com/OvidPerl
Official Perl 6 Wiki - http://www.perlfoundation.org/perl6

___
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] Page of results with Template Toolkit?

2009-06-23 Thread Naylor Garcia
There is page of results with Template Toolkit?

Thanks ;)

Naylor Garcia

The imagination is more important than intelligence

___
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] Error in subclassing Catalyst::Controller::DBIC::API::REST

2009-06-23 Thread Amiri Barksdale
I have a controller inheriting from a ControllerBase class that contains
the following:

   package RestTest::ControllerBase::REST;

   use strict;
   use warnings;
   use base qw/Catalyst::Controller::DBIC::API::REST/;

   sub create :Private {
   my ($self, $c) = @_;
   $self-next::method($c);
   if ($c-stash-{created_object}) {
   %{$c-stash-{response}-{new_object}} =
   %$c-stash-{created_object}-get_columns;
   }
   }

   1;


All the ControllerBase does is stash that object on create requests. I
was following lukes's example at
http://search.cpan.org/~lsaunders/Catalyst-Controller-DBIC-API-1.003000/lib/Catalyst/Controller/DBIC/API.pm#EXTENDING.
The relevant part of the controller is:


   package RestTest::Controller::API::REST::Artist;

   use strict;
   use warnings;
   use base qw/RestTest::ControllerBase::REST/;
   use JSON::Syck;

   __PACKAGE__-config(
   action  =  { setup = { PathPart = 'artist',
   Chained = '/api/rest/rest_base' } },
   ...
   );


Now for the problem. When I go to test this:

   my $mech = Test::WWW::Mechanize::Catalyst-new;
   ok(my $schema = DBICTest-init_schema(), 'got schema');

 my $req = GET(http://localhost/api/rest/artist/list;, {
 }, 'Accept' = 'text/x-json' );
 $mech-request($req);
 cmp_ok( $mech-status, '==', 200, 'open attempt okay' );


I get the error:

   'Method GET not implemented for http' =
   '//localhost/api/rest/artist/api/rest/artist/object'

Somehow my request path gets all messed up. I dumped out the $mech, and it tells
me that $mech-base is indeed what I put. So is $mech-redirected_uri.



Amiri

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