[Catalyst] Problem with dependencies in Makefile.PL

2007-02-05 Thread Svilen Ivanov

Hi,

I'm building Catalyst application which depends on several CPAN
modules which I want to install automatically as part of the build
procedure of my application. To achieve this I put following lines in
my Makefile.PL:

requires 'Catalyst::Plugin::Session' => 0;

If the module enlisted there has unsatisfied dependencies, it doesn't
install them automatically nor at least ask for confirmation. For
example, C::P::Session module requires 2 CPAN modules:
Object::Signature and Test::Deep which aren't installed and build
procedure fails. Here is sample from the output:

===cut===
CPAN.pm: Going to build M/MR/MRAMBERG/Catalyst-Plugin-Session-0.14.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Object::Signature 0 not found.
Warning: prerequisite Test::Deep 0 not found.
Writing Makefile for Catalyst::Plugin::Session
 Unsatisfied dependencies detected during
[M/MR/MRAMBERG/Catalyst-Plugin-Session-0.14.tar.gz] -
   Object::Signature
   Test::Deep
Running make test
 Delayed until after prerequisites
Running make install
 Delayed until after prerequisites
*** Catalyst::Plugin::Session installation failed.
*** Module::AutoInstall installation finished.
==

Would guys have any idea how to install a module with its dependencies?

-- Svi

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


Re: [Catalyst] Problem with dependencies in Makefile.PL

2007-02-05 Thread Svilen Ivanov

2007/2/6, Jonathan Rockway <[EMAIL PROTECTED]>:
[...]

Sounds like your CPAN config might be broken.  What's prerequisites_policy
set to in your CPAN config?  (You can check by running the cpan shell and
typing "o conf prerequisites_policy".)  If it's not "yes", try setting it to
yes and re-running make.


It is set to 'ask':
cpan> o conf prerequisites_policy
   prerequisites_policy ask

Now I changed it to 'yes', still no luck (I tried another module -
Test::Parser which needs few XML:: libs since I already installed
C::P::Session from CPAN shell)


If that doesn't work, it would be helpful if you provide the output of "o
conf" and the log from typing "install Catalyst::Plugin::Session" in the CPAN
shell.


I needed to continue my work I  installed Catalyst::Plugin::Session
from CPAN shell - w/o any problems; it properly asked me to install
the dependent modules as well.

When I changed the policy to 'yes', CPAN shell no longer asks me to
install deps - they are automaticly skipped:

 Unsatisfied dependencies detected during
[B/BR/BRYCE/Test-Parser-1.5.tar.gz] -
   XML::Twig
   XML::Simple
   Chart::Graph::Gnuplot
 Ignoring dependencies on modules XML::Twig, XML::Simple, Chart::Graph::Gnuplot



Then I tried to rebuild CPAN::Config - I deleted it and re-run cpan
shell. I noticed that the option for "prerequisites_policy" may be
"follow" instead of "yes" as it asked me:

Policy on building prerequisites (follow, ask or ignore)? [ask]

Anyway - I chose now 'follow' - now it installs automatically any
dependency from shell but still doesn't work when running perl
Makefile.PL && make - fails with same error.

The saga ended when I installed latest Module::Install and
Bundle::CPAN - now it works fine.

Thank you Jonathan for pointing me to the right direction!

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


[Catalyst] Catalyst::View::TT bug if DUMP_CONFIG enabled

2007-02-06 Thread Svilen Ivanov

Hi,

There is runtime error when I enable DUMP_CONFIG in C::V::TT that
prints Template toolkit configuration. The error is:

Couldn't instantiate component "My::V::TT", "Undefined subroutine
&Catalyst::View::TT::Dump called at
/usr/local/share/perl/5.8.8/Catalyst/View/TT.pm line 120." at
script/my_server.pl line 52

Here is very simple patch that solves the problem:

diff -upNr Catalyst-View-TT-0.25.orig/lib/Catalyst/View/TT.pm
Catalyst-View-TT-0.25/lib/Catalyst/View/TT.pm
--- Catalyst-View-TT-0.25.orig/lib/Catalyst/View/TT.pm  2007-02-06
23:00:05.0 +0200
+++ Catalyst-View-TT-0.25/lib/Catalyst/View/TT.pm   2007-02-06
23:00:32.0 +0200
@@ -117,7 +117,7 @@ sub new {
}

if ( $c->debug && $config->{DUMP_CONFIG} ) {
-$c->log->debug( "TT Config: ", Dump($config) );
+$c->log->debug( "TT Config: ", Data::Dump::dump($config) );
}
if ( $config->{PROVIDERS} ) {
my @providers = ();


Regards,
Svi

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


[Catalyst] HTTP redirect - delayed Firefox

2007-02-08 Thread Svilen Ivanov

Hi,

I'm experiencing very odd issues when I'm trying to make HTTP redirect
with '$c->res->redirect'.

I use the development server with option "-k - keep alive". If I make
HTTP redirect, Firefox 2.0.0.1 waits exactly 5 seconds before it loads
the new location. If I disable the keep alive the 5-second delay is
gone. Konqueror behaves the same way. Internet Explorer (surprise,
surprise) is exact opposite  - it doesn't work at all w/o keep alive,
and if the keep alive is enabled, there is no delay. Opera works OK w/
or w/o keep-alive - no delay.

I've read few postings that explains the IE and keep alive issues but
I couldn't explain why FF/Konqueror wait 5 sec before executing the
redirect if keep alive is on.

Any ideas?

Regards,
Svi

P.S. I can supply HTTP request/responses captured with Ethereal if needed

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


Re: [Catalyst] HTTP redirect - delayed Firefox

2007-02-08 Thread Svilen Ivanov

2007/2/8, John Napiorkowski <[EMAIL PROTECTED]>:
[...]


I believe that when redirecting as a result of a post
that 303 is supposed to be correct, whereas 302 is
used for redirects when the information is merely at a
different location.  But I'm not an expert.  So 303 is
probably what most of us use redirect for, like when
you click on save in a form and then you want to
redirect the user back to a different page.

I think this is use is because when Firefox sees a 302
it's expecting more info or something and it doesn't
play nice with the build in server.  It didn't bother
me enough to dig.


Thank you John for your prompt answer! I tried 303 - still lags for 5
seconds when "-k" is on. I can live with this delay as long it doesn't
appear when I deploy the app on Apache mod_perl/fcgi. Do you know if
it appears on test server only?

Regards,
Svi

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


Re: [Catalyst] HTTP redirect - delayed Firefox

2007-02-08 Thread Svilen Ivanov

Andy, John -- thank you for your replies. If it doesn't appear in
real-life deployment - I'm fine with it

2007/2/9, John Napiorkowski <[EMAIL PROTECTED]>:


--- Svilen Ivanov <[EMAIL PROTECTED]> wrote:

> 2007/2/8, John Napiorkowski <[EMAIL PROTECTED]>:
> [...]
> >
> > I believe that when redirecting as a result of a
> post
> > that 303 is supposed to be correct, whereas 302 is
> > used for redirects when the information is merely
> at a
> > different location.  But I'm not an expert.  So
> 303 is
> > probably what most of us use redirect for, like
> when
> > you click on save in a form and then you want to
> > redirect the user back to a different page.
> >
> > I think this is use is because when Firefox sees a
> 302
> > it's expecting more info or something and it
> doesn't
> > play nice with the build in server.  It didn't
> bother
> > me enough to dig.
>
> Thank you John for your prompt answer! I tried 303 -
> still lags for 5
> seconds when "-k" is on. I can live with this delay
> as long it doesn't
> appear when I deploy the app on Apache
> mod_perl/fcgi. Do you know if
> it appears on test server only?

For me it disappeared when running under
mod_perl+Apache2.  I think that's why there isn't a
big push to solve it.  Good luck.  --john


>
> Regards,
> Svi
>
> ___
> List: Catalyst@lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>





The fish are biting.
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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



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


[Catalyst] Resurrected: HTTP redirect - delayed Firefox

2007-02-23 Thread Svilen Ivanov

Hi,

Today I received this email from Ryan explaining the problem with
Firefox and strange delay in keep-alive. In nutshell the problem is
lack of content-length in headers could be added easily (see below).

Regards,
Svi

-- Forwarded message --
From: Ryan VanderBijl
Date: 23.02.2007 13:55
Subject: Catalyst keepalive/firefox problem (possible fix)

I'm developing/testing my application using :
   ./scripts/myapp_server.pl -r -f

I was having problems when browsing the site using IE. Some (but not
all) of my redirects were having problems (using both 302 and 303
redirects).

Eventually I stumbled upon a suggestion to use the -k keep-alive
option. This fixed the IE redirect problem, but Firefox seems to always
wait 5 seconds after each redirect.  (i expected this, as the suggestion
for -k came from the list archive with the title of "HTTP redirect -
delayed Firefox") This corresponds to the Catalyst::Engine::HTTP
can_read(5) call, near the end of the _handle_request function.

Anyways, although I still don't understand why IE needs the -k option to
redirect properly, I think I've solved the Firefox Delay problem.

The HTTP/1.1 RFC says in section 8.1.2.1:
  In order to remain persistent, all messages on the connection MUST
  have a self-defined message length (i.e., one not defined by closure
  of the connection), as described in section 4.4.

But the Engine::HTTP doesn't provide the Content-Length. This can be fixed
by adding a few lines in finalize_headers (Engine/HTTP.pm, at line 53):
   if ($self->_keep_alive) {
   $c->response->headers->content_length( length($c->response->body) );
   }
Both IE and Firefox seem to play well this change.

Now if only we could figure out why IE doesn't work without the -k...
Otherwise I suggest that we make the -k the default. Having all browsers
play nicely be default is a good thing (IMO). (And might save someone
else a day of trying to track down an elusive bug).

I'm not on the catalyst mailing list, so it bounched this message back to me.
I don't feel like joining just to send this email.

Thanks for your time,

-Ryan

--
Ryan VanderBijl   |   http://vbijl.net/~ryan/

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


Re: [Catalyst] Resurrected: HTTP redirect - delayed Firefox

2007-02-23 Thread Svilen Ivanov

2007/2/24, Andy Grundman <[EMAIL PROTECTED]>:

I've fixed it already, but I still need to add a test for it.  http://
dev.catalyst.perl.org/changeset/6109


Thank you guys for the quick response!

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


Re: [Catalyst] (en) error screen translations

2007-08-30 Thread Svilen Ivanov
Just a side note - The URL you provided screw the UTF8 for Bulgarian
translation. Here is  better one:

http://lists.scsys.co.uk/pipermail/catalyst/2006-May/007342.html

2007/8/30, Jonathan Rockway <[EMAIL PROTECTED]>:
> Should I apply these extra translations from $A_LONG_TIME_AGO?
>
> http://grokbase.com/post/2006/04/29/catalyst-translations-for-error-message/mJp7PqYdMOElr-7JEF-m4SjP7B0
>
> Regards,
> Jonathan Rockway
>
>
> ___
> List: Catalyst@lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
>
>
>


-- 
Svilen Ivanov
http://svilen-online.blogspot.com

There is no dark side of the moon really.
Matter of fact it's all dark.

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