Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application

2010-01-30 Thread Hans Dieter Pearcey
Excerpts from xenoterrac...@gmail.com's message of Fri Jan 29 22:36:53 -0500 
2010:
 Hmm. Perhaps i misunderstand the concept. I was thinking there was the third
 option of using a psgi server or mod psgi 

I didn't see any reference to either, but it doesn't matter; comparing either
of those as PSGI to FastCGI still doesn't make sense.  A psgi server would
probably mean a standalone http server, roughly equivalent to
Catalyst::Engine::HTTP or HTTP::Prefork, and mod_psgi is an Apache module.

Your email client is misconfigured or something, btw; you're starting new
threads every time you reply to this one.

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] Using Catalyst with mod_per or FastCGI on heavy traffic web application

2010-01-29 Thread Hans Dieter Pearcey
Excerpts from xenoterrac...@gmail.com's message of Fri Jan 29 20:22:48 -0500 
2010:
 Enlightening how do you feel about fastcgi vs psgi?

This question makes no sense.  How do you feel about HTML vs. HTTP?

PSGI is an interface for Perl code.  FastCGI is an interface for network
communications.  They aren't in the same problem space, except to the degree
that there are FastCGI servers that then run PSGI applications.

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] mod_fcgid on win32

2010-01-28 Thread Hans Dieter Pearcey
Excerpts from Alexander Hartmaier's message of Thu Jan 28 09:00:28 -0500 2010:
 I'm running mod_fcgid on debian because it comes as a distro package
 while mod_fastcgi doesn't.

Yes it does:

http://packages.debian.org/search?keywords=libapache2-mod-fastcgi

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] mod_fcgid on win32

2010-01-28 Thread Hans Dieter Pearcey
Excerpts from Alexander Hartmaier's message of Thu Jan 28 09:29:42 -0500 2010:
 I've looked *multiple* times for it, but not in the non-free repo.
 Do you know why it is there?

Probably because it has a weird license:

http://packages.debian.org/changelogs/pool/non-free/liba/libapache-mod-fastcgi/libapache-mod-fastcgi_2.4.6-1/copyright

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 to de-serialize json?

2010-01-27 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Wed Jan 27 19:14:29 -0500 2010:
 I see.  So you are saying that Content-Type: application/json might need to
 be deserialized differently in different applications that share the same
 interpreter?  Obviously, json could decode into an array ref so that could
 not be mapped to request parameters.  Is that what you mean?  Or that an
 application might want the raw json?

Well, we know from this thread that the last one, at least, is true; you would
like it to go into body_params and I wouldn't.

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 to de-serialize json?

2010-01-23 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Sat Jan 23 19:45:28 -0500 2010:
 On Sat, Jan 23, 2010 at 1:40 PM, J. Shirley jshir...@gmail.com wrote:
 
 
 
  If I assume that decoding is synonymous with de-serialization, it
  makes more sense.  At first thought, I just don't think they're that
  similar, though.  Maybe in implementations (comparing JSON to HTTP
  POST parameters) it is, but in the case of HTTP::Body decoding a
  mime64-encoded JPEG, it isn't at all.
 
 
 
 With a jpeg I assume the content type would be form-data (that included an
 upload in the form) where the file ends up in $req-uploads, not as a
 request parameter.

That assumption may hold true for *your* applications, but he didn't say
anything about a form or even a web browser.  It's perfectly reasonable,
especially in the context of REST APIs, to talk about non-form-based request
bodies.  (I've written actions that accepted PUT requests with a content-type
of application/vnd.ms-excel, for example.)

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 to de-serialize json?

2010-01-23 Thread Hans Dieter Pearcey
Excerpts from Bill Moseley's message of Sat Jan 23 21:47:00 -0500 2010:
 On Sat, Jan 23, 2010 at 5:39 PM, Hans Dieter Pearcey 
 hdp.perl.catalyst.us...@weftsoar.net wrote:
 
  Excerpts from Bill Moseley's message of Sat Jan 23 19:45:28 -0500 2010:
 
   With a jpeg I assume the content type would be form-data (that included
  an
   upload in the form) where the file ends up in $req-uploads, not as a
   request parameter.
 
  That assumption may hold true for *your* applications, but he didn't say
 
 But, that's a different content type.  I assumed form-data.  So, in this

You said: What about extending HTTP::Body, e.g. to decode JSON into body_params?

jshirley said: Ugh.  Also, what about (non-param-like) things like jpegs?

You said: Well, they'd be file uploads.

I said: You might like that, but you can't assume everyone would, and the
  request might not even have a form content-type.

You said: Well, they'd be file uploads.

Me, writing this message: ???

As far as I can tell, you missed the point of my message, which makes me wonder
if I've missed the point of yours.  Are you talking about a set of conventions
you'd like to be able to build for your own use on top of HTTP::Body, or a set
of conventions that you expect everyone will want and so should be built into
HTTP::Body, or something else entirely?

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] Fat Model Methodology?

2010-01-21 Thread Hans Dieter Pearcey
Excerpts from Jeff Albert's message of Thu Jan 21 12:37:41 -0500 2010:
 should I create a separate 'application object' model which brokers requests
 from the Controllers and uses the DBIC model to implement them if they fit the
 application's logic?

I'm a big fan of this; when your application gets complex enough, trying to do
everything in the ORM classes can lead you down the path of a lot of class
methods and complex hash/array data structures.

High-level abstractions that arise out of the interactions of your DB classes
deserve their own classes.

(If your application *isn't* complex enough, this can be pretty clunky, so it's
not a trivial decision.)

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] Catalyst::View::Email stopped working

2010-01-19 Thread Hans Dieter Pearcey
Excerpts from Charlie Garrison's message of Tue Jan 19 10:21:58 -0500 2010:
 Is this a bug with C::V::Email or Email::Sender, or am I doing 
 something wrong?

It's a bug in C::V::Email.  I'm not sure who's fixing it.  Downgrading to 0.13
should fix 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/


Re: [Catalyst] lib question

2010-01-15 Thread Hans Dieter Pearcey
Excerpts from Dermot's message of Fri Jan 15 12:44:49 -0500 2010:
 I guess it just a matter of approach. The Makefile.PL has
 
 all_from 'lib/MyApp.pm';
 
 so I guess that's what you mean by setting up @INC. I tend to execute
 prove from the top level directory as `prove -r t`. I guess I will
 have to get used to use the -I option as well.

Uh, no, all_from is for setting metadata about the module.  It has nothing to
do with tests.

I think Florian means `prove -l`, which is equivalent to -Ilib.

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] Bugzilla REST API in Catalyst

2010-01-11 Thread Hans Dieter Pearcey
Excerpts from Gervase Markham's message of Mon Jan 11 09:10:38 -0500 2010:
 hg co http://hg.mozilla.org/webtools/bzapi bzapi

that's 

  hg clone http://hg.mozilla.org/webtools/bzapi bzapi

I suspect.

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

2009-06-22 Thread Hans Dieter Pearcey
On Tue, Jun 23, 2009 at 01:33:01PM +1000, kakim...@tpg.com.au wrote:
 I ran perl Makefile.PL --bootstrap PREFIX=/home/kakimoto -- went OK

Nothing in the documentation for local::lib OR the calendar entry you linked to
says to use a PREFIX= parameter here.

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

2009-06-22 Thread Hans Dieter Pearcey
On Tue, Jun 23, 2009 at 01:45:09PM +1000, kakim...@tpg.com.au wrote:
 Yes, I actually tried doing it without PREFIX but it still didn;t work.
  Then I thought that since I installed perl modules into my home
 directory, maybe that's using the PREFIX would do the trick.

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:

  I tried the directions, and that didn't work with this error [log here], so
  I tried again with PREFIX=whatever, and that didn't work either, with (the
  same error / this error [log here] )

It's not clear yet whether you've given us the error you received when you
first tried it (without PREFIX).

Even better would be a full log of your shell session when you try to install
local::lib, in case there are details that you don't know are relevant.

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-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] Killing the standalone perl server programatically

2009-06-12 Thread Hans Dieter Pearcey
On Fri, Jun 12, 2009 at 02:19:19PM +0100, Stefan Washietl wrote:
 The obvious thing

 exit(0);

 does not work. Any ideas how to do this?

  purl Look buddy, doesn't work is a strong statement. Does it sit on the
 couch all day?  Is it making faces at you? Does it want more money? Is
 it sleeping with your girlfriend?  Please be specific!

You will get much more useful help if you tell us exactly what code you wrote,
what you expected, and what happened instead, including error messages (if
any), instead of summing it all up as exit(0) does not work.

You mentioned the standalone server (and its forks), but by default the
standalone server doesn't fork, so you should also be more specific about how
you're running 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/


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


Re: [Catalyst] catalyst.pl-generated installer installs MyApp/root in same dir as MyApp/lib/*?

2009-06-09 Thread Hans Dieter Pearcey
On Tue, Jun 09, 2009 at 06:57:19PM +0100, Tomas Doran wrote:
 However most people don't actually install their applications (in a make  
 install type way), and so this isn't so much of an issue for them...

This is so strange to me; I *always* install my applications with make install,
or make debian packages of them, or...

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] Re: Lighttpd and mod_perlite

2009-06-08 Thread Hans Dieter Pearcey
On Mon, Jun 08, 2009 at 11:09:24PM +0200, Aristotle Pagaltzis wrote:
 What sort of requirements does FastCGI cover better in your
 experience?

I don't know what Matt has in mind, but doing zero-downtime restarts with
FastCGI over a unix socket is pretty easy because of filesystem semantics.

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] Mason + DBI + Catalyst?

2009-05-25 Thread Hans Dieter Pearcey
On Tue, May 26, 2009 at 12:35:45AM +0200, Daniel Carrera wrote:
 Is there any good documentation for Catalyst that is based on Mason?

http://search.cpan.org/~flora/Catalyst-View-Mason-0.17/lib/Catalyst/View/Mason.pm

 Any suggestions?

Nothing's stopping you from just using DBI.

http://search.cpan.org/~alexp/Catalyst-Model-DBI-0.20/lib/Catalyst/Model/DBI.pm

(I've never actually used this.)

Anyway, the coupling between Catalyst, DBIC, and TT is loose, and it sounds
like you're expecting a lot more opinionation from the framework than is
actually there.  (I'll leave it up to someone else to advocate for DBIC over
plain DBI.)

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] Mason + DBI + Catalyst?

2009-05-25 Thread Hans Dieter Pearcey
On Mon, May 25, 2009 at 04:00:38PM -0700, J. Shirley wrote:
The view should just be thin templates, in that regard I would
recommend using Catalyst::View::MicroMason
(http://search.cpan.org/~jrockway/Catalyst-View-MicroMason-0.05/lib/
Catalyst/View/MicroMason.pm) which wraps Text::MicroMason (Mason
template syntax without the framework).

Ew.  If the OP is used to non-trivial Mason -- autohandlers, subcomponents,
methods, etc., all things that are reasonable as part of a templating engine
(i.e. not web framework-related) -- MicroMason isn't really going to be
satisfactory.

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] Mason + DBI + Catalyst?

2009-05-25 Thread Hans Dieter Pearcey
On Tue, May 26, 2009 at 01:37:40AM +0200, Daniel Carrera wrote:
 Btw, why is it called DBIC if CPAN says DBIx::Class?

For the same reason Mason isn't called HTML and Class::DBI isn't called
Class.  The first part of a module's namespace is not necessarily how people
refer to it.

 Being able to chain resultsets makes it much much easier than using  
 straight SQL, and you write less code.  If you have a query you've  
 constructed called $query, and lets say you now only want active 
 records you can do $query = $query-search({ active = 1 });  In this 
 way you can filter many things incrementally.

 But is that efficient? It looks like you are getting MySQL to return the  
 entire data set and then making Perl filter it. That can't be efficient.

That isn't what's happening; DBIC resultsets don't actually hit the database
until they need to, and incrementally building up conditions doesn't need to.

This isn't the right place to ask your questions or correct all your
misconceptions about DBIC.  You really should see its mailing list or irc
channel (listed in the documentation).

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] Run the test server on a different port than 3000

2009-05-21 Thread Hans Dieter Pearcey
On Thu, May 21, 2009 at 09:23:12PM +0300, Octavian Râşniţă wrote:
 I have Catalyst::Devel 1.15 and I have also force installed it again, but 
 it gives the same error.

You forgot to read the whole message:

 Update Catalyst::Devel to at least 1.15 and regenerate your scripts,  
   ^^^

Having a newer verion just *installed* doesn't help.

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 to bind an array using my own schema

2009-05-13 Thread Hans Dieter Pearcey
On Wed, May 13, 2009 at 11:10:01AM -0700, Jakub Tutaj wrote:
 Is it possible to bind an array in code like below? Binding simple variables
 works perfectly...

You meant to ask this question on the dbix-class mailing list; there isn't any
Catalyst-related content here.

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] Handling of keywords for controller methods

2009-05-11 Thread Hans Dieter Pearcey
On Mon, May 11, 2009 at 06:13:19PM +0100, Matt S Trout wrote:
 That's a bug, the attribute should -not- be called 'actions'.

Or, at least, its accessor shouldn't.  (Naming the attribute itself 'actions'
vs. '_actions' is a matter of taste.)

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] unknown resource

2009-05-02 Thread Hans Dieter Pearcey
On Sat, May 02, 2009 at 06:17:19PM +0300, Octavian Râşniţă wrote:
 Yes, this was the problem. I made some tests and I came to the conclusion 
 that Catalyst responds to all those URIs which don't have a distinct 
 Alias when it is used with fastcgi, no matter if they are handled by 
 other modules.

ITYM I broke my Apache config.  This doesn't have anything to do with
Catalyst specifically, just with how you specify url mappings for what.

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] website member urls

2009-04-29 Thread Hans Dieter Pearcey
On Wed, Apr 29, 2009 at 05:31:43PM -0300, Fernan Aguero wrote:
 On Wed, Apr 29, 2009 at 5:23 PM, Charles cshtr...@yahoo.com wrote:
  I'd like someone w/ better catalyst-fu to recommend how I could implement
  urls for members a la myspace and youtube ( ie
   http://websiteurl.com/membername ) .
  There's got to be a better way that creating a seperate controller for each
  user.
 
 sub member : Regex('\S+') {
  my ($self, $c) = @_;

Using Regex for that seems weird to me.

  sub member : Chained(/) Args(1) {
my ($self, $c, $id) = @_;
...
  }

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] website member urls

2009-04-29 Thread Hans Dieter Pearcey
On Wed, Apr 29, 2009 at 04:42:08PM -0400, Hans Dieter Pearcey wrote:
   sub member : Chained(/) Args(1) {
 my ($self, $c, $id) = @_;
 ...
   }

duh, with PathPart('') also.

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] Migrating mod_perl app to Catalyst

2009-04-27 Thread Hans Dieter Pearcey
On Mon, Apr 27, 2009 at 01:54:12PM -0500, Michael Reddick wrote:
 Does anyone have any advice for migrating a large mod_perl app that has no
 tests to catalyst?

Write some tests with Test::WWW::Mechanize first; they should be relatively
easy to port to Catalyst tests once you swap it in.

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] unexpected behavior of $c-request-secure and $c-request-base

2009-04-25 Thread Hans Dieter Pearcey
On Sat, Apr 25, 2009 at 06:29:50AM -0700, Bill Moseley wrote:
 The SSL decryption is happening on Apache and Apache is proxying the
 request to Catalyst.

What?  No it isn't.  It's using mod_perl; there's no reverse proxying going on
from the config snippet pasted.

Also, this means that Engine::CGI is a red herring.

Dear original poster: is Apache2::ModSSL installed? 

Here's the relevant code from Engine::Apache:

if ($INC{'Apache2/ModSSL.pm'}) {
$c-request-secure(1) if $self-apache-connection-is_https;
} else {
my $https = $self-apache-subprocess_env('HTTPS'); 
$c-request-secure(1) if defined $https and uc $https eq 'ON';
}

The port should have nothing to do with 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/


Re: [Catalyst] unexpected behavior of $c-request-secure and $c-request-base

2009-04-25 Thread Hans Dieter Pearcey
On Sat, Apr 25, 2009 at 05:46:55PM -0700, seasproc...@gmail.com wrote:
 Dear original poster: is Apache2::ModSSL installed?
 
 
 No, it's not. Should it be? Other than to avoid this issue?

I have no idea; the code I pasted from Engine::Apache uses it as its preferred
method of determining SSL-ness.  Try installing it and see if your application
correctly detects -secure.

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] RFC: Sample press release and announcement homepage

2009-04-23 Thread Hans Dieter Pearcey
On Thu, Apr 23, 2009 at 08:46:29AM -0700, John Napiorkowski wrote:
 And in particular my first swing at something we can use as a press release
 and send to all the usual suspect (Slashdot, Digg, etc):
 http://dev.catalystframework.org/wiki/releaseannouncements/58pressrelease

Most of your paragraphs are tl;dr, which isn't helped by the fact that there's
basically no links or any other kind of differentiation between different parts
of the text.

Moose Object Development Environment: huh? does anyone call it that anywhere?

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] RFC: Sample press release and announcement homepage

2009-04-23 Thread Hans Dieter Pearcey
On Thu, Apr 23, 2009 at 10:19:50AM -0700, John Napiorkowski wrote:
 I'm not sure what you mean by tl;dr

too long, didn't read.  Big blocks of text.  You could probably split each of
those paragraphs up so that people's eyes don't get lost in the middle.

  Moose Object Development Environment: huh? does anyone call
  it that anywhere?
 
 We really need something, since Moose alone mean nothing to most of the
 world.  Willing to hear suggestions.  I'll bring it to the Moose channels as
 well.

'the Moose object system' -- that's its name and what it is.  If that's not
good enough, well, you already know where to find people to discuss it with.

Ranting at me about how this is really important is a little odd since you left
this to be discovered in a Catalyst press release rather than, say, bringing it
up on #moose or mo...@perl.org -- it's not like you've been trying to get us to
decide on a name for months or something, and have now given up.

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] RFC: Sample press release and announcement homepage

2009-04-23 Thread Hans Dieter Pearcey
On Fri, Apr 24, 2009 at 12:14:00AM +0200, Zbigniew Lukasiak wrote:
 ... the revolutionary Moose Object system, the most advanced Object
 Oriented framework for any major scripting language
 
 I would change that to 'one of the most advanced' - less flame
 igniting (and by the way Perl 6 probably does have a more advanced
 Object system).

Is there anything for Ruby, Python, or PHP that's comparable?  I mean, those
are the other major scripting languages.

Perl 6 is not a major scripting language.

I think John's version is fine.

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] Catalyst::Controller::REST + use Catalyst qw/Server Server::XMLRPC/ = Error

2009-04-08 Thread Hans Dieter Pearcey
On Wed, Apr 08, 2009 at 06:00:36PM -0700, Bruce McKenzie wrote:
 Note that if you have a custom request class in your application, and it does
 not inherit from CCatalyst::Request::REST, your application will fail with 
 an
 error indicating a conflict the first time it tries to use
 CCatalyst::Request::REST's functionality.  To fix this error, make sure your
 custom request class inherits from CCatalyst::Request::REST.
 ---
 but that doesn't seems like an option here. (These are peers, not parent/child
 classes)
 
 Am I missing something obvious?

Doesn't this suck?  It should clearly be a request role instead of a request
class.

Seriously, I plan to fix this very soon, and I'm sorry it's still biting you.

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 to do REST without deserializing uploaded files (PUT)

2009-03-31 Thread Hans Dieter Pearcey
On Tue, Mar 31, 2009 at 09:03:15PM -0700, Bruce McKenzie wrote:
 Is there a way to declare some paths as NOT subject to deserialization? The
 reason I ask is that I want it for most everything...just not for a few paths.

Instead of deserializing in begin() (as C::C::REST does for you), this might
work:

  sub deserialize : Chained(/) PathPart('') ActionClass(Deserialize) {}

  sub foo : Chained(deserialize) ActionClass(REST) {}
  sub foo_POST {...} # etc.

  sub bar : ActionClass(REST) {}
  sub bar_PUT {...} # etc.

foo comes from the deserialize action, bar doesn't, so a PUT to /bar won't
trigger deserialization. (note: totally untested.)

In the future, when we all have flying cars, REST and Deserialize will be
action roles, and you can do:

  sub foo : Does(REST) Does(Deserialize) {}
  sub foo_POST {...}

  sub bar : Does(REST) {}
  sub bar_PUT {...}

I'm open to other suggestions.

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] DELETE through REST and Jemplate

2009-03-30 Thread Hans Dieter Pearcey
On Mon, Mar 30, 2009 at 10:46:57AM -0700, J. Shirley wrote:
 On Mon, Mar 30, 2009 at 10:31 AM, Emmanuel Quevillon t...@pasteur.fr wrote:
 function remove_item(id){
 Jemplate.process('test.tt2',
 '[% Catalyst.uri_for(/rest/item/) %]'+id,
 '#_item');
}
 
 Thanks for this help
 
 Emmanuel
 
 
 Oh, I missed it because it just is a Jemplate.process line... didn't even see
 the remove_item. 
 
 That's a GET request, since it just fetches something remotely from the server
 and does nothing else. 

As an aside, conceptually, using your template's process method to delete an
item seems really crazy.

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/


[Catalyst] Re: Catalyst::Controller::REST and Data::Denter

2009-03-25 Thread Hans Dieter Pearcey
On Thu, Mar 26, 2009 at 01:11:13AM -0400, Hans Dieter Pearcey wrote:
 Data::Denter was last uploaded in 2002, when it was marked with a big
 DEPRECATED warning.
 
 Does anyone actually use it?  I'd like to remove support for it from 
 C::C::REST.

Whether or not anyone uses it, I'm removing the prompt to install it -- no one
should be installing Data::Denter anew at this point.

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/


[Catalyst] Catalyst::Controller::REST and Data::Denter

2009-03-25 Thread Hans Dieter Pearcey
Data::Denter was last uploaded in 2002, when it was marked with a big
DEPRECATED warning.

Does anyone actually use it?  I'd like to remove support for it from C::C::REST.

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] Re: (OT) Navigation parameters in session

2009-02-26 Thread Hans Dieter Pearcey
On Fri, Feb 27, 2009 at 08:12:55AM +0100, Zbigniew Lukasiak wrote:
 Thanks for you all for the arguments.  The crazy thing is that they
 believe that with some
 Javascript magic we'll be able to manage the multiple tabs and back
 button problem.

And now you have three problems.

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/