[Catalyst] REST advocates - a call to arms

2006-11-27 Thread Kieren Diment

To all you REST advocates out there,

I've got 3 or 4 slots left on the advent calendar, which sounds like an
ideal opportunity for you crazy web service advocates to illustrate what on
earth it is that you are on about.

I'm after short 300 lines at most examples (can stretch to about 500 I
suppose).  If a very simple reference implementation of what you are on
about is possible, all the better.  These can be uploaded to the catalyst
svn repository.

Talk to me about it on the #catalyst-dev channel, or on the catalyst-dev
mailing list.
___
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] Re. Re: Template::Latex - Almost there

2006-11-27 Thread Yves Räber
Hello,

It took my a while to have some time and try it again ...

Thank you very much Michele ! That's right, everything was right and the PDF
creation works just fine in the production environment (mod_perl). I wanted to
confirm , maybe this could be usefull for someone else.

But now I'm intrigued ... why does all system() call made from inside the dev
server
return -1 ?

Thanks again :)

Yves.


> Hello Yves!
>
> > I spent quite a lot of time trying to find what was wrong when using
> > Template::Latex from within Catalyst. My code worked just fine as
> > standalone application, but not inside Catalyst.
>
> I don't know if this is your problem, but beware that Template::Latex
> won't work with Catalyst develpment server.
>
> The problem is that the Template::Latex expects system("pdflatex ...")
> to return 0, but all system() call made from inside the dev server
> return -1. You'll however have no problem at all when running Catalyst
> in a CGI/FastCGI/mod_perl environment.
>
> Michele.
>
> --
> Michele Beltrame
> http://www.varlogarthas.net/
> ICQ# 76660101
> Informativa privacy: http://www.italpro.net/em.html


___
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] something wrong because manual and tutorials are missing

2006-11-27 Thread Hermida, Leandro
Hello all,
 
I remember someone mentioning earlier in the list that the manual and
tutorials are missing and indeed I believe they are right.  If you go to
CPAN and lookup the Catalyst Runtime with the pass three latest versions
(5.7006, 5.7005, 5.7004) the documentation is pretty much gone.  Only
back at 5.7003 does one see the full documenation and tutorials.  In the
5.7006, 5.7005, 5.7004 versions if you start clicking around on any of
the manual links then you get the CPAN URL not found error.
 
Leandro
 
 
___
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] sorry correction on manuals and tutorials missing

2006-11-27 Thread Hermida, Leandro
Hello again,
 
Sorry, I see that there is a separate distribution called
Catalyst-Manual that has everything.  This will confuse new users though
because when they have searched for Catalyst and get to the home page of
the Catalyst-Runtime distribution and then click on any of the first
links after the synopsis: Catalyst::Manual::Intro or
Catalyst::Manual::Tutorial or Catalyst::Manual (which takes you to its
POD and none of the links work there) you get URL NOT FOUND from CPAN.
 
Leandro
 
 
___
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] Re: Catalyst::Action::REST

2006-11-27 Thread Garrett Goebel


On Nov 21, 2006, at 9:44 PM, Garrett Goebel wrote:

On Nov 21, 2006, at 9:16 AM, Matt S Trout wrote:

Garrett Goebel wrote:
I tunneled PUT and DELETE inside a POST via a "_method" body  
parameter, which was automatically unravelled before dispatch  
within an overridden Catalyst::prepare_body_parameters method.


Clever. Would you be willing to separate that out as a plugin with  
a configurable parameter name? I think that might be well-received  
(and actually something that *should* be a plugin for once :)


I'll see what I can do. I'll be off the grid over the Thanksgiving  
holidays. But I'll take my laptop with me. There's a good chance  
I'll have the time, but with 4 kids under the age of 10, I can't  
make any promises ;)


On the ride home from the holidays, I managed to throw together my  
first catalyst plugin module. That was, the easy part. Now I need to  
write the tests and package it up for CPAN consumption.



I'd like to invite criticism and comments now, before changes get  
more painful.


For starters:

Is there a better package name?

Should I be inheriting from Catalyst::Base or Catalyst::Component?  
The documentation says to use the former, but from scanning the code,  
it looks like I only need the latter. On this one, I've stuck with  
the documentation.


Should I be using Class::C3 for ->next::method instead of - 
>NEXT::method? There are quite a few caveats in the Class::C3  
documentation about not playing well with SUPER, but no mention of  
how well it plays with NEXT.


Should I be using $c->config->{'Catalyst::Plugin::Request::Method'}?  
The documentation seems to indicate this, but the existing plugin  
modules seem to prefer shorter keys. Here I went with the preference  
for shorter keys that seemed evident in the plugin modules I scanned.  
Easy enough to reverse.



package Catalyst::Plugin::Request::Method;
use 5.008;
use strict;
use warnings;
use version; our $VERSION = qv('0.0.1');
use base qw(Catalyst::Base);
use NEXT;

sub setup {
my $c = shift @_;

$c->NEXT::setup(@_);

my $cfg = ( $c->config->{'request_method'} ||= {} );
$cfg->{tunnel_param} ||= '_method';

return $cfg;
}

sub prepare_body_parameters {
my $c   = shift @_;
my $req = $c->request;

$c->NEXT::prepare_body_parameters(@_);

my $tunnel_param = $c->config->{'request_method'}-> 
{'tunnel_param'};


# Allow POST to masquerade as other request method via  
body_parameter
if ($req->method eq 'POST' && exists $req->parameters-> 
{$tunnel_param}) {

my $request_method = $req->parameters->{$tunnel_param};
$req->method($request_method);
delete $req->parameters->{$tunnel_param};
}

1;
}

1;

__END__



___
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] I have compiled mysql successfuly in cygwin

2006-11-27 Thread Dave Howorth
Mao DengFeng-e13751 wrote:
> 
> Hi, all
>  
> Maybe this has a little about Catalyst. But I only want to tell you the
> good news
> I have compiled mysql successfully in cygwin

You might want to post this information on the MySQL Perl Mailing List


Cheers, Dave


___
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] How to use HTML::Widget::Constraint::Date

2006-11-27 Thread Michele Beltrame

Hello Alejandro!


I decided to create my own class in my controller namespace but I
think it can be contributed to HTML::Widget::Constraint namespace if
anyone here has acces to that.


I have several constraints as well which I think might be useful, so I 
was interested in creating and "CPANning" a distribution maybe named 
HTML::Widget::MoreConstraints which would collect them all. However, I 
still have to do that as, chatting with Carl and (especially) with mst, 
it seems that we'll be moving away from HTML::Widget soon enough...


So, I'm waiting some days by the window to see what to do. ;-) If you 
are interested in getting this done, however, please let me know.


Michele.

--
Michele Beltrame
http://www.varlogarthas.net/
ICQ# 76660101
Informativa privacy: http://www.italpro.net/em.html

___
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] Template::Latex - Almost there

2006-11-27 Thread Michele Beltrame

Hello Yves!


Thank you very much Michele ! That's right, everything was right and the PDF
creation works just fine in the production environment (mod_perl). I wanted to
confirm , maybe this could be usefull for someone else.

But now I'm intrigued ... why does all system() call made from inside the dev
server
return -1 ?


It seems it has something to do with the daemon restarter code, but I 
know almost nothing regarding the internals of Catalyst::Engine::HTTP so 
I can tell you nothing more. The thing I now, however, is that a good 
patch for this problem would be welcome. ;-)


Michele.

--
Michele Beltrame
http://www.varlogarthas.net/
ICQ# 76660101
Informativa privacy: http://www.italpro.net/em.html

___
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] Re: Catalyst::Action::REST

2006-11-27 Thread Matt S Trout

Garrett Goebel wrote:


On Nov 21, 2006, at 9:44 PM, Garrett Goebel wrote:

On Nov 21, 2006, at 9:16 AM, Matt S Trout wrote:

Garrett Goebel wrote:
I tunneled PUT and DELETE inside a POST via a "_method" body 
parameter, which was automatically unravelled before dispatch within 
an overridden Catalyst::prepare_body_parameters method.


Clever. Would you be willing to separate that out as a plugin with a 
configurable parameter name? I think that might be well-received (and 
actually something that *should* be a plugin for once :)


I'll see what I can do. I'll be off the grid over the Thanksgiving 
holidays. But I'll take my laptop with me. There's a good chance I'll 
have the time, but with 4 kids under the age of 10, I can't make any 
promises ;)


On the ride home from the holidays, I managed to throw together my first 
catalyst plugin module. That was, the easy part. Now I need to write the 
tests and package it up for CPAN consumption.



I'd like to invite criticism and comments now, before changes get more 
painful.


For starters:

Is there a better package name?

Should I be inheriting from Catalyst::Base or Catalyst::Component? The 
documentation says to use the former, but from scanning the code, it 
looks like I only need the latter. On this one, I've stuck with the 
documentation.


For a plugin, neither most likely.

Should I be using Class::C3 for ->next::method instead of 
->NEXT::method? There are quite a few caveats in the Class::C3 
documentation about not playing well with SUPER, but no mention of how 
well it plays with NEXT.


Much though I despise it, probably NEXT

Should I be using $c->config->{'Catalyst::Plugin::Request::Method'}? The 
documentation seems to indicate this, but the existing plugin modules 
seem to prefer shorter keys. Here I went with the preference for shorter 
keys that seemed evident in the plugin modules I scanned. Easy enough to 
reverse.


Acceptable.


___
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] Template::Latex - Almost there

2006-11-27 Thread Jonathan Rockway
Michele Beltrame wrote:
>> But now I'm intrigued ... why does all system() call made from inside
>> the dev
>> server
>> return -1 ?
>
> It seems it has something to do with the daemon restarter code, but I
> know almost nothing regarding the internals of Catalyst::Engine::HTTP so
> I can tell you nothing more. The thing I now, however, is that a good
> patch for this problem would be welcome. ;-)

It's being worked on.  There's a failing test case (t/live_fork.t) in svn.

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

___
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] How to use HTML::Widget::Constraint::Date

2006-11-27 Thread Andrew Peebles

Michele Beltrame wrote:

Hello Alejandro!


I decided to create my own class in my controller namespace but I
think it can be contributed to HTML::Widget::Constraint namespace if
anyone here has acces to that.


I have several constraints as well which I think might be useful, so I 
was interested in creating and "CPANning" a distribution maybe named 
HTML::Widget::MoreConstraints which would collect them all. However, I 
still have to do that as, chatting with Carl and (especially) with 
mst, it seems that we'll be moving away from HTML::Widget soon enough...


So, I'm waiting some days by the window to see what to do. ;-) If you 
are interested in getting this done, however, please let me know.


Michele.


What is the up-n-coming alternative to HTML::Widget?
a

___
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] How to use HTML::Widget::Constraint::Date

2006-11-27 Thread Carl Franks

On 27/11/06, Andrew Peebles <[EMAIL PROTECTED]> wrote:

Michele Beltrame wrote:
> Hello Alejandro!
>
>> I decided to create my own class in my controller namespace but I
>> think it can be contributed to HTML::Widget::Constraint namespace if
>> anyone here has acces to that.
>
> I have several constraints as well which I think might be useful, so I
> was interested in creating and "CPANning" a distribution maybe named
> HTML::Widget::MoreConstraints which would collect them all. However, I
> still have to do that as, chatting with Carl and (especially) with
> mst, it seems that we'll be moving away from HTML::Widget soon enough...
>
> So, I'm waiting some days by the window to see what to do. ;-) If you
> are interested in getting this done, however, please let me know.
>
> Michele.
>
What is the up-n-coming alternative to HTML::Widget?


reaction ;)

Well, maybe longer term, yes.
But for now, a replacement is in active development.
See the html-widget mailing list for discussion, and lets move any
further discussion over there.

Cheers,
Carl

___
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] sorry correction on manuals and tutorials missing

2006-11-27 Thread Jonathan Rockway
Hermida, Leandro wrote:
> Hello again,
>  
> Sorry, I see that there is a separate distribution called
> Catalyst-Manual that has everything.  This will confuse new users though
> because when they have searched for Catalyst and get to the home page of
> the Catalyst-Runtime distribution and then click on any of the first
> links after the synopsis: Catalyst::Manual::Intro or
> Catalyst::Manual::Tutorial or Catalyst::Manual (which takes you to its
> POD and none of the links work there) you get URL NOT FOUND from CPAN.

The recommended route for new users is to install
Task::Catalyst::Tutorial.  That will install the manual, tutorial,
example app, and all dependencies (which is very convenient :).

Also, installing a newer version of Catalyst-Devel will install the
manual, since the manual is a prerequisite of ::Devel.  We haven't
released a new version of Devel since the Manual changes, though, since
there haven't been any major changes to C::Helper (and friends).

If you find broken links on search.cpan, please open a problem ticket in
RT and I'll take a look.  Thanks in advance.

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

___
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] RFC: file/path writing sub-class of Catalyst::Plugin::Static::Simple

2006-11-27 Thread Jonathan Rockway
Kieren Diment wrote:
> [snipped prior correspondence]
> 
> I'm not sure, because systems architecture is really not my thing, but
> this sounds like something you might describe as
> Catalyst::Plugin::Cache::Static - which would render a template  into a
> variable and serve off an appropriate path for the webserver to deal
> with.  Kind of like PageCache, but designed to totally bypass catalyst
> for read-only docs.

This is exactly what Apache's mod_cache does.  It fetches the page once
(from Catalyst), and then stores it until it expires (set in the
headers).  The caching is URL based, but by cleverly applying
mod_rewrite you can have it account for cookies, etc.

Docs are here:

http://httpd.apache.org/docs/2.2/mod/mod_cache.html

Maybe this would be a good advent calendar topic?

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

___
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] Re: something wrong because manual and tutorials are missing

2006-11-27 Thread A. Pagaltzis
* Hermida, Leandro <[EMAIL PROTECTED]> [2006-11-27 11:35]:
> I remember someone mentioning earlier in the list that the
> manual and tutorials are missing and indeed I believe they are
> right. If you go to CPAN and lookup the Catalyst Runtime with
> the pass three latest versions (5.7006, 5.7005, 5.7004) the
> documentation is pretty much gone.

Errm, yeah, because they’re in the Catalyst-Manual distro now.

Regards,
-- 
Aristotle Pagaltzis // 

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