Re: [Catalyst] email

2007-05-08 Thread Bogdan Lucaciu
On Tuesday 08 May 2007 03:55:31 Kieren Diment wrote:
>  "Intermediate  Perl"

the name is (now) "Learning Perl Objects, References, and Modules"
http://www.oreilly.com/catalog/lrnperlorm/

-- 
Bogdan Lucaciu
http://www.wiz.ro

___
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] email

2007-05-08 Thread Tobias Kremer
Zitat von Bogdan Lucaciu <[EMAIL PROTECTED]>:

> On Tuesday 08 May 2007 03:55:31 Kieren Diment wrote:
> >  "Intermediate  Perl"
>
> the name is (now) "Learning Perl Objects, References, and Modules"
> http://www.oreilly.com/catalog/lrnperlorm/

I think it's the other way round. The name is NOW "Intermediate Perl":

"This book has been updated—the edition you're requesting is
OUT OF PRINT. Please visit the catalog page of the latest edition."

which links straight to "Intermediate Perl".

--Tobias

___
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] email

2007-05-08 Thread Bogdan Lucaciu
On Tuesday 08 May 2007 10:23:06 Tobias Kremer wrote:
> Zitat von Bogdan Lucaciu <[EMAIL PROTECTED]>:
> > the name is (now) "Learning Perl Objects, References, and Modules"
> I think it's the other way round. The name is NOW "Intermediate Perl":
dang. 
ENEEDMORECOFFEE

-- 
Bogdan Lucaciu
http://www.wiz.ro

___
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 make MyApp::B a part of MyApp::A ?

2007-05-08 Thread Oleg Pronin

This interface is accessible under /folder/. It has its own templates,
static content, DBIC sources and controllers.
What excatly do i need to specify?

So please share your ideas :)


2007/5/8, Matt S Trout <[EMAIL PROTECTED]>:


On Mon, May 07, 2007 at 06:58:16PM +0400, Oleg Pronin wrote:
> I can test the part related to the subject of this thread with great
> pleasure.
>
> I'm currently making full-featured dynamic admin interface for catalyst
(not
> so simple as plugin CRUD :) )
> And it will have been loaded as plugin into a project (while this
interface
> is catalyst project itself). That's because i need this feature.

Can you elaborate on that? I have some ideas on how you could implement
that
without making the admin interface a complete app in its own right (and
remember you can always make a standalone one by just loading the admin
interface code at / in an otherwise empty app :)

--
 Matt S Trout   Need help with your Catalyst or DBIx::Class
project?
  Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a
quote

http://www.shadowcatsystems.co.uk/

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


Re: [Catalyst] email

2007-05-08 Thread Cristina Nunes

From perldoc Net::POP3




use Net::POP3;

  # Constructors
  $pop = Net::POP3->new('pop3host');
  $pop = Net::POP3->new('pop3host', Timeout => 60);

  if ($pop->login($username, $password) > 0) {
my $msgnums = $pop->list; # hashref of msgnum => size
foreach my $msgnum (keys %$msgnums) {
  my $msg = $pop->get($msgnum);
  print @$msg;
  $pop->delete($msgnum);
}
  }



On 5/7/07, Will Smith <[EMAIL PROTECTED]> wrote:

Hi, first of all, I want to apology if this question does not belong to this
mail list.
 I am working on an email function that read in pop3 mails and return some
values such as Subject, From, To, Date. I try Net::POP3, simple code like:

 my $pop = Net::POP3->new('mymailserver.com', Timeout => 60);

 if ($pop->login($username, $password) > 0) {
   my $msg = $pop->top(1);  # just read the 1 mail
 ...
 }

 ---
 If I stash out the value of $msg, it is an ARRAY(...) . I'm not sure how to
manipulate that. I hope that someone (not getting mad because I pop the
message in wrong room) would help me out a bit with which module is good to
use for this type of work.

 Thank you



 
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.


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





--
 Saying that Java is nice because it works on all OS's is like
saying that anal sex is nice because it works on all genders

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Anthony Gardner
I seem to remember hearing sth a few months ago about a comp between various 
MVC apps comprising of various teams / tasks / time limits etc.

Does anyone know what I'm talking about here?! 

If s.o does, what became of it and are there any links to be had to read up on 
what happened?

CIA

-Anthony


-
 What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship.___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Tobias Kremer
> I seem to remember hearing sth a few months ago about a comp between various
> MVC apps comprising of various teams / tasks / time limits etc.
>
> Does anyone know what I'm talking about here?!
>
> If s.o does, what became of it and are there any links to be had to read up
> on what happened?

You probably mean the plat_forms contest held in Nuernberg, Germany:

http://www.plat-forms.org/2007

No results yet, but I'm looking forward to seeing them, too :)

--Tobias

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Anthony Gardner
Hmmm, no, I don't think that is what I was talking about (though it might 
be)

I thought the competition was made up of teams that were part of communities 
rather than companies.

Plus, I'm sure RoR had a representation in the comp I was thinking of. This 
comp is just PHP/Perl/Java.



Tobias Kremer <[EMAIL PROTECTED]> wrote: > I seem to remember hearing sth a few 
months ago about a comp between various
> MVC apps comprising of various teams / tasks / time limits etc.
>
> Does anyone know what I'm talking about here?!
>
> If s.o does, what became of it and are there any links to be had to read up
> on what happened?

You probably mean the plat_forms contest held in Nuernberg, Germany:

http://www.plat-forms.org/2007

No results yet, but I'm looking forward to seeing them, too :)

--Tobias

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


   
-
 Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for 
your freeaccount today.___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Tobias Kremer
> Hmmm, no, I don't think that is what I was talking about (though it might
> be)
> I thought the competition was made up of teams that were part of communities
> rather than companies.

Oh, okay, nevermind then. Sounds interesting, though. Tell us if you find
something out about it.

> Plus, I'm sure RoR had a representation in the comp I was thinking of. This
> comp is just PHP/Perl/Java.

Ruby and Python didn't make it because there were too few teams. The
interesting thing is that Perl was first left out of the competition and
got included later on due to the Perl community's protest :)

--Tobias

___
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] Static content with catalyst

2007-05-08 Thread Len Jaffe

On 5/7/07, Kyncho Pehotinec <[EMAIL PROTECTED]> wrote:


Hello,

Definitely! Everything under /root/static is getting served _as static
content_.
I don't see a reason to install yet another plugin/module to serve
static files.



You should see a reason. That reason being that if you want to server your
static content through your cat app (which is another discussion
altogether), then the away to do it is Catalyst::Plugin::Static::Simple.

You need not install it. It is part of the Cat distribution.  Just include
it with the other plug-ins, and lmost everything in /root/static will be
served as static content.  Check the docs for configuration instructions.

Len.
--
[EMAIL PROTECTED]
614-404-4214
___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Anthony Gardner
Yeah, have just read the site more carefully and I think it is the one. But, 
what a poor turn out! Rails couldn't couldn't even raise a smile ;)

Shame there weren;t more teams from the communities involved as I would've 
thought they'd thrive in an environment like that.

Maybe next year if I'm up to speed with it all, I might give it a go ;) (don;t 
hold me to it, though)

Tobias Kremer <[EMAIL PROTECTED]> wrote: > Hmmm, no, I don't think that is 
what I was talking about (though it might
> be)
> I thought the competition was made up of teams that were part of communities
> rather than companies.

Oh, okay, nevermind then. Sounds interesting, though. Tell us if you find
something out about it.

> Plus, I'm sure RoR had a representation in the comp I was thinking of. This
> comp is just PHP/Perl/Java.

Ruby and Python didn't make it because there were too few teams. The
interesting thing is that Perl was first left out of the competition and
got included later on due to the Perl community's protest :)

--Tobias

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


   
-
 Yahoo! Answers - Got a question? Someone out there knows the answer. Tryit now.___
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] Hats off and some Clarifications.

2007-05-08 Thread Matt S Trout
On Fri, Apr 20, 2007 at 11:30:22PM -0700, Nathaniel Nuss wrote:
> On Thu, Apr 19, 2007 at 01:58:08AM +1000, Kieren Diment wrote:
> > On 19/04/07, Dister Kemp <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >claims that it does automatic generation of HTML forms and other
> > >Database scripts. (to an extent). They call it scaffolding.
> > >
> > >Is this possible with Catalyst? If so to what extent and how?
> > 
> > [...], Catalyst::Controller::FormBuilder is highly rated by many
> > at the moment.
> 
> I see that FormBuilder (and C:C:FB) primarily ease the creation, (request)
> maintanence and validation of forms.
> 
> Unless I've missed something C:C:FB won't do automatic form generation. By
> that I mean you are not able to provide a database table and have a form
> automatically generated from it or expect a submission from the user to be
> automagically sent to the database. You have to make that glue yourself.

But said glue is half a dozen lines, in the simplest case, and once it gets
more complex than that it usually ceases to be generalisable.

Ruby on Rails experts all warn against using any form of automation for this
as well - for once they and we agree, and when that happens it's usually a
good hint the answer is correct :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] MySQL server has gone away

2007-05-08 Thread Matt S Trout
On Thu, Apr 26, 2007 at 10:29:23PM +0400, Oleg Pronin wrote:
> I'm creating a DBI wrapper (it will be called DBIx::Safe) that handles all
> disconnections transparently.
> If there is no transaction this module gives you 100% guarantee that your
> query will be executed without disconnection errors.
> In case of transaction it will notify you when you can safely restart the
> transaction (when it fails because of disconnection). This is very good
> feature for DBIx:Class's txn_do method. DBIC could restart the transaction
> (which is coderef) until it is completed succesfully.
> Together it could be 100% disconnections-safe system.

Please have a look at how DBIx::Class -current handles this - we've already
done significant work towards exactly what you describe and I'd rather you
extracted out our work into something we could depend on than see you
re-write the same code.

Also, would you be interested in svn space for this? I'd be a little worried
about making DBIx::Class depend on somebody I've never heard of in case they
were hit by a bus or similar - keeping it in our svn has allowed us to recover
from 'developer vanished' problems on other modules before ...

If you'd like to continue this discussion, please can we switch to the DBIC
list? I'm only replying here for consistency within the thread :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] Fwd: YAPC Europe 2007 Reminder - CFP and CFH Deadlines Approaching

2007-05-08 Thread Thomas Klausner
- Forwarded message from Michael Kr?ll <[EMAIL PROTECTED]> -

From: Michael Kr?ll <[EMAIL PROTECTED]>
Subject: [pm_groups] YAPC Europe 2007 Reminder - CFP and CFH Deadlines
Approaching
Date: Tue, 08 May 2007 11:34:30 +0200
To: [EMAIL PROTECTED]

Hi,

The deadline to submit Hackathon proposals for this year's YAPC Europe
in Vienna is just around the corner. Please do not forget to submit your
proposals by Sunday, 13th May 2007. Information on what we're looking
for exactly and what we can offer to moderators (e.g.
travel/accommodation refund) can be found at:
  http://vienna.yapceurope.org/ye2007/cfh.html

The Call for Papers deadline is less than 3 weeks away from today:
  http://vienna.yapceurope.org/ye2007/cfp.html

The theme for this year's conference is "Social Perl", which we hope
will inspire submissions for this and related topics. If Perl has helped
you or your company to get people together, or if you can report how
Perl is "social" to other programming languages, or how Perl may profit
from inspirations from other languages, we'd like to hear about it.
Although this is our main topic for the conference, it will not be the
only one, and as such we will also be accepting talks on just about any
theme.

Types of talks include 20 or 40 minutes talks, 60-90 minute tutorials,
or 3 hour Hack-a-thons, BOFs or Workshops.

There are still some slots free!

Hope to see you in Vienna,
Michael Kr?ll
on behalf of Vienna.pm

-- 
063A F25E B064 A98F A479  1690 78CD D023 5E2A 6688
http://zis.uibk.ac.at/.m/uibk.ac.at_pgp_pubkey.asc
-- 
Request pm.org Technical Support via [EMAIL PROTECTED]

pm_groups mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/pm_groups

- End forwarded message -

-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

___
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] Tip: Serving Static Files with lighttpd

2007-05-08 Thread Matt S Trout
On Fri, Apr 20, 2007 at 10:05:54AM +0200, Bernhard Graf wrote:
> Wherever I looked I only found advice how to serve static files with 
> Apache.
> 
> Here is the same for lighttpd:

Fantastic. Could you POD this up for a cookbook patch please?

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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: forwarding to chained actions

2007-05-08 Thread Matt S Trout
On Tue, Apr 24, 2007 at 06:35:48PM +0200, Bernhard Graf wrote:
> Nilson Santos Figueiredo Junior wrote:
> 
> > On 4/24/07, Bernhard Graf <[EMAIL PROTECTED]> wrote:
> > > I don't want to be rude, but could you guys open your own thread
> > > when you want to discuss pros and cons of forwards and redirects?
> >
> > This is the classic XY problem[1]. They're trying to show you that Y
> > is bad for solving X.
> >
> > No one wants to discuss the pros or cons of forwards vs redirects
> > (since it's an already settled debate). They're trying to show you
> > the proper way of solving X.
> 
> I've already found *my* proper way. None of the alleged problems apply 
> to my application.
> 
> That said I would like to repeat my question:
> 
> Is there a way to forward to (the end point of) a chained action and run 
> the whole action chain again?

No, because in any case where you'd want to do this you should be using
a redirect :)

We don't tend to add features to Catalyst whose sole purpose is to support
bad design - if you want to write your app badly, you get to do it yourself.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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 during catalyst-maunal-tutorial

2007-05-08 Thread Matt S Trout
On Wed, Apr 25, 2007 at 06:30:29PM +0800, Adlina Baozhu wrote:
> Hi,alls
> 
>   I am following the tutorial of  CatalystManualTutorial to try my
> trip of Catalyst.
> 
> In the CatalystBasics.html , I have meet a problem.It happen with this:
> 
> 
> Everything go right before it tell me to do. 
> 
> when it call me to use "Catalyst::Model::DBIC::Schema" to load model
> class.

Can you try installing Task::Catalyst::Tutorial to make sure you've got all
the necessary modules, please?

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] many Views that may include common display fragments

2007-05-08 Thread Matt S Trout
On Thu, Apr 26, 2007 at 10:25:09AM +1000, Steve H wrote:
> Again, thanks... and it's great to see such diversity in Catalyst usage and 
> help offerred.
> 
> To reiterate part of the problem..  in the final View that composes the 
> (final) page, I'd want to include HTML fragments that were created by 
> common functions (that could create them for other pages too).  Trouble is, 
> things came unstuck when I forward('someCommonFunction' ... which fires the 
> controller to fetch the data, then it's associated View to actually create 
> the HTML fragment; it would normally be plugged into response body, however 
> the (Seamstress) resultant Tree object is also Stash'able or returned and 
> the body could get ignored... when the forward() returns, I'd have the Tree 
> (html'able) fragment that I could stitch into the main doc's html tree that 
> is then finally  rendered as_html().
> -- that's where it comes unstuck... it can't seem to recurse that stuff.
> Note that I'm using Seamstress (as opposed to TT).

The TT view supports a render() method to generate chunks for this sort of
purpose (plus the standard process() to fill res->body of course).

Maybe the Seamstress view needs bringing up to date.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] need nntp server

2007-05-08 Thread Matt S Trout
On Thu, Apr 26, 2007 at 12:20:49AM -0700, 万朝伟 wrote:
> yes,I can read NNTP News from news.gmane.org, but some times, I want to 
> post and reply,I can't do this on that NNTP server.thanks for any help

Subscribe to the list. Then set your subscription preferences to not
receive mail. Now you have an address you can post from.

Now just hit reply instead of followup in your news client.


... kids these days, think they know what NNTP is but don't know how to
use a news client properly ... sigh ...
-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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 many models?

2007-05-08 Thread Matt S Trout
On Thu, Apr 26, 2007 at 10:02:24PM +0100, Jamie Neil wrote:
> John Napiorkowski wrote:
> >I think the consensus is that it's best to create business logic type
> >models outside of Catalyst and then build a simple wrapper model for
> >it.  That way you can use it for stuff like cron jobs and anything
> >that doesn't live inside of Catalyst.
> 
> That's exactly what we're trying to do.
> 
> >Now I isolated the business logic for creating an account into the
> >MyApp::Logic::Accounts package because for my system creating a new
> >user is much more than just inserting a row into the Users database.
> >The logic would using the MyApp::Schema::Users Class and some other
> >classes and wrap all that into a neat interface.
> 
> Again, this is the direction we are going, however what I was concerned 
> about was that this way we would end up with a lot more database handles 
> that was necessary (we may have three or four models). Whilst this is 
> not a problem for a single application, we are planning on running many 
> instances sharing the same database server.
> 
> Of course I may just be misunderstanding how DBIx::Class works :)

Just make sure your applications share the DBIx::Class::Storage::DBI
object between any $schema instances they're using - then they'll all use
a single persistent $dbh.

Alternatively, just make your logic models get their DBIC objects via
ACCEPT_CONTEXT (see Catalyst::Component) at which point everything's running
through the one DBIC::Schema model eventually.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] query once per session?

2007-05-08 Thread Matt S Trout
On Thu, Apr 26, 2007 at 02:35:09PM -0700, Michael Higgins wrote:
> I'm wondering how I can get a query (that becomes a drop-down list for a
> form field) set to execute only once and return the data from the client
> side, or at least from memory, until the session ends.

my $data = $c->session->{drop_down_data} ||= $self->get_grop_down_data($c);

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] Catalyst Engine Start-up Flag?

2007-05-08 Thread Matt S Trout
On Fri, Apr 27, 2007 at 01:53:00PM +0100, Lee Goddard wrote:
> From: Marcello Romani [mailto:[EMAIL PROTECTED] 
> 
> > Lee Goddard ha scritto:
> > > Is there a variable somewhere that can tell me when Catalyst's 
> > > dev-server is starting up?  Because it seems to be calling every
> method 
> > > I've written, but without parameters, which intentionally causes
> errors 
> > > when in production, but shouldn't during automated tests.
> > > 
> > > Thanks in anticipation
> >
> > Can you be more specific ?
> >
> > What do you mean by 'calling every method I've written ?'
> 
> Sorry: I meant when the server starts, it seems to attempt to call 'new'
> for every *.pm in MyApp::Model::* :
> 
> Couldn't instantiate component "CTT::Model::SWF"

That's supposed to happen. Try making sure the tests can find a config file
(see Plugin::ConfigLoader docs for what env var to set for this) that provides
a suitable set of config info for them to be instantiated with.

If you don't want the ::Model::* object instantiated, don't inherit from
Catalyst::Model.

Oh, and next time you ask the list for help, please explain the -actual-
problem and the behaviour you're seeing rather than asking for help with
your half-assed hack around it, you'll get better answers faster (nothing
personal, this mistake is so common it's got its own name - "XY problem" :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] refactoring an existing HTML::Mason installation to use Catalyst

2007-05-08 Thread Matt S Trout
On Sat, Apr 28, 2007 at 11:28:38AM -0500, Garrett Goebel wrote:
> Marc,
> 
> I just did the opposite for an old Mason site at work the other day.  
> I embedded mason pages in catalyst. I.e., I used  
> Catalyst::View::Mason and created a controller that forwarded all the  
> mason pages to it.
> 
> Because Catalyst::View::Mason uses Mason without Apache you won't  
> have access to $r. For my purposes this wasn't a big deal. As a quick  
> hack in my controller I put $c->stash->{backend} = 'catalyst'. Then  
> in the autohandler I dropped:
> 
> <%args>
> $backend
> 
> my $r = $c->request  if $backend eq 'catalyst';
> 
> $r and $c->request were similar enough that this worked for me. Your  
> milage may vary.

$c->req is 'close enough' to Apache::Request, CGI or HTTP::Request objects.
This is handy.

If you're under mod_perl you can get at the Apache $r via $c->engine->apache
IIRC (but I'd try and avoid this if possible, one of the best things about
Cat migration for me is always being able to use the test server rather than
a full mod_perl dev rig)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
  http://www.shadowcatsystems.co.uk/ 

___
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] Oh yeah, by the way ...

2007-05-08 Thread Matt S Trout
... I finally got my e-mail sorted out :)

Hope nobody missed their daily dose of insane hacks, sarcasm and occasional
chainsaw-induced screaming too much while I was gone.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Matt S Trout
On Tue, May 08, 2007 at 09:28:35AM +0100, Anthony Gardner wrote:
> I seem to remember hearing sth a few months ago about a comp between various 
> MVC apps comprising of various teams / tasks / time limits etc.
> 
> Does anyone know what I'm talking about here?! 

If it was MVC, why would rails be included?

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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 make MyApp::B a part of MyApp::A ?

2007-05-08 Thread Matt S Trout
On Tue, May 08, 2007 at 12:20:33PM +0400, Oleg Pronin wrote:
> This interface is accessible under /folder/. It has its own templates,
> static content, DBIC sources and controllers.
> What excatly do i need to specify?

Whether it shares views/models/etc. with the main app, like I asked in my
first reply to this thread :)

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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 make MyApp::B a part of MyApp::A ?

2007-05-08 Thread Oleg Pronin

I think it would be better if it does not.
Because AppA don't know and don't want to know the templates and models of
AppB. They communicate through controllers only.


2007/5/8, Matt S Trout <[EMAIL PROTECTED]>:


On Tue, May 08, 2007 at 12:20:33PM +0400, Oleg Pronin wrote:
> This interface is accessible under /folder/. It has its own templates,
> static content, DBIC sources and controllers.
> What excatly do i need to specify?

Whether it shares views/models/etc. with the main app, like I asked in my
first reply to this thread :)

--
Matt S TroutNeed help with your Catalyst or DBIx::Class
project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a
quote
http://chainsawblues.vox.com/
http://www.shadowcatsystems.co.uk/

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


Re: [Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread mreece
> On Tue, May 08, 2007 at 09:28:35AM +0100, Anthony Gardner wrote:
>> I seem to remember hearing sth a few months ago about a comp between
>> various MVC apps comprising of various teams / tasks / time limits etc.
>>
>> Does anyone know what I'm talking about here?!
>
> If it was MVC, why would rails be included?
>
> --
>  Matt S TroutNeed help with your Catalyst or DBIx::Class

what distinction are you making here to exclude rails from MVC?


___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Luis Azevedo
On Tuesday 08 May 2007, [EMAIL PROTECTED] wrote:
>  > On Tue, May 08, 2007 at 09:28:35AM +0100, Anthony Gardner wrote:
>  >> I seem to remember hearing sth a few months ago about a comp between
>  >> various MVC apps comprising of various teams / tasks / time limits etc.
>  >>
>  >> Does anyone know what I'm talking about here?!
>  >
>  > If it was MVC, why would rails be included?
>  >
>  > --
>  >  Matt S TroutNeed help with your Catalyst or DBIx::Class
>
>  what distinction are you making here to exclude rails from MVC?
>
>
>  ___
>  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/

Somehow, Matt looks like to have some love/hate relationship with rails :P.

What I still not understand is why he says RoR isn't MVC O:). 

-- 
Luís Azevedo (Braceta)


___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Matt S Trout
On Tue, May 08, 2007 at 03:24:15PM +0100, Luis Azevedo wrote:
> On Tuesday 08 May 2007, [EMAIL PROTECTED] wrote:
> >  > On Tue, May 08, 2007 at 09:28:35AM +0100, Anthony Gardner wrote:
> >  >> I seem to remember hearing sth a few months ago about a comp between
> >  >> various MVC apps comprising of various teams / tasks / time limits etc.
> >  >>
> >  >> Does anyone know what I'm talking about here?!
> >  >
> >  > If it was MVC, why would rails be included?
> >
> >  what distinction are you making here to exclude rails from MVC?
> 
> Somehow, Matt looks like to have some love/hate relationship with rails :P.

I agree with them on some things and find other design decisions laughable.
 
> What I still not understand is why he says RoR isn't MVC O:). 

Because their "models" are dumb data objects and they shove all the business
logic into what they call the controller.

>From the article that originally defined MVC -

"Models -- The model of an application is the domain-specific software 
simulation or implementation of the application's central structure."

"Views -- In this metaphor, views deal with everything graphical: they request 
data from their model and display the data."

"Controllers -- Controllers contain the interface between their associated 
models and views and the input devices (e.g., keyboard, pointing device, time)."

i.e. the controller should handle receiving user input and processing it
appropriately - the domain logic should reside in the model.

This is bloody important for building good application architecture - a cron
script or e-mail gateway should be able to invoke e.g. a create user function
in the model without ever having to load the web-related code. If your
create user logic is in the controller, you're stuck with either talking to the
app over HTTP or simulating a request.

The controller's there for event dispatch and flow handling. Domain logic
should be encapsulated - if anything, you want to make your domain model a
completely separate piece of code with an interface model (or Facade Model)
that your application interacts with.

All rails really does is separate out the logic and the presentation - which
you could do just as easily with a PHP page or CGI that invokes a templating
engine to render the HTML. It's better than having everything in one file, but
it damn well isn't MVC.

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Perrin Harkins

On 5/8/07, Luis Azevedo <[EMAIL PROTECTED]> wrote:

What I still not understand is why he says RoR isn't MVC O:).


The way most people use Rails and Catalyst is somewhat different from
the MVC concept.  The traditional role of the controller is just to
map user input to a method, and nothing more.  All of the business
logic is supposed to be in the model.

Most users of RoR and Catalyst put a bunch of code in what gets
referred to as the controller and call auto-generated ORM classes the
model.  Most of the code they put in the controller is really the
model too.

If you just change your naming and refer to RoR/Catalyst controllers
as models and your web server + the RoR/Catalyst code as the
controller, it would fit the MVC concept better.  It won't solve the
issue of wanting to reuse your model code in a non-web environment
though.  For that, you'd need to keep that code in some kind of
separate model classes, or fold it into your ORM classes.

All that said, the typical approach works fine for most people.  It
just doesn't fit MVC very well.  Maybe it needs its own name, like HDT
(Handlers, Database objects, Templates).

- Perrin

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Dave Rolsky

On Tue, 8 May 2007, Matt S Trout wrote:


The controller's there for event dispatch and flow handling. Domain logic
should be encapsulated - if anything, you want to make your domain model a
completely separate piece of code with an interface model (or Facade Model)
that your application interacts with.


Another way to state this is that the Controller is a bridge between the 
core of the app (the model) and a view _for a specific environment_. For 
web apps, that environment is usually CGI/HTTP requests.


But a controller could also be something for bridging CLI commands to the 
model (with no view per se) or maybe a GUI app, where the controller would 
probably the event loop and dispatching to various widgets.


One criterion for proper use of MVC would be to ask yourself "can I 
replace the controller with a command-line args parser/dispatcher and 
still use my model to do everything my web app can do". If you can say 
yes, you've at least made a good separation between model and controller.



-dave

/*===
VegGuide.Orgwww.BookIRead.com
Your guide to all that's veg.   My book blog
===*/

___
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 make MyApp::B a part of MyApp::A ?

2007-05-08 Thread Matt S Trout
On Tue, May 08, 2007 at 06:13:29PM +0400, Oleg Pronin wrote:
> I think it would be better if it does not.
> Because AppA don't know and don't want to know the templates and models of
> AppB. They communicate through controllers only.

How about, after setup_components, injcting AppB's ->controllers into
AppA's ->_components hash under 'AppA::Controller::AppB::' and then
having a tweak in 'sub dispatch' in AppA that, if it sees an AppB::*
controller, reblesses $c into AppB, fiddles req->base and req->path
appropriately, and then calls AppB's ->dispatch.

Bit insane but probably the quickest path to implement this, and without
doing it and seeing what goes wrong I'm not sure we can figure out the
'correct' approach.

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Dave Rolsky

On Tue, 8 May 2007, Perrin Harkins wrote:


On 5/8/07, Luis Azevedo <[EMAIL PROTECTED]> wrote:

What I still not understand is why he says RoR isn't MVC O:).


The way most people use Rails and Catalyst is somewhat different from
the MVC concept.  The traditional role of the controller is just to
map user input to a method, and nothing more.  All of the business
logic is supposed to be in the model.


There's a little more than just mapping input to a method. I think of it 
as a translation layer between how the web server presents data and how my 
model API wants it. And then there's reverse mapping, for example 
translating exceptions thrown by the model into error messages we can show 
to the user.



Most users of RoR and Catalyst put a bunch of code in what gets
referred to as the controller and call auto-generated ORM classes the
model.  Most of the code they put in the controller is really the
model too.


I don't ;)

One consequence of doing MVC the "right" way, though, is that you tend to 
up with rather large and complex sets of model classes. This doesn't 
bother me, but it's definitely the case that I end up with the bulk of my 
application's code in the model.



-dave

/*===
VegGuide.Orgwww.BookIRead.com
Your guide to all that's veg.   My book blog
===*/

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Perrin Harkins

On 5/8/07, Dave Rolsky <[EMAIL PROTECTED]> wrote:

There's a little more than just mapping input to a method. I think of it
as a translation layer between how the web server presents data and how my
model API wants it. And then there's reverse mapping, for example
translating exceptions thrown by the model into error messages we can show
to the user.


Both good points.  My post was over-generalized and glossed over some
things.  Your point about separating the model from the environment is
the real heart of the issue.


One consequence of doing MVC the "right" way, though, is that you tend to
up with rather large and complex sets of model classes.


I think it's fine for people to shortcut this and shove model stuff
into their RoR/Catalyst controller classes, as long as they understand
the trade-off they are making, i.e. it will be difficult to separate
this code and reuse it elsewhere.

- Perrin

___
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] C::P::C3 not working on Mac OS X

2007-05-08 Thread Jonas Alves

Hi all,
I have an application that works well on my Linux box, but dumps the
the following error in Mac OS X:

[error] Caught exception in engine "Can't use an undefined value as a
HASH reference at /Library/Perl/5.8.6/Catalyst/Engine/CGI.pm line 62."

That line is:
unless ( $c->config->{using_frontend_proxy} ) {...

If I dump $c->config it is undefined.
I'm using C::P::C3 so I tried to remove it and it worked.
I also tried to add C::P::C3 to a newly generated catalyst application
and i get the same error.
Anyone has any idea why C::P::C3 isn't working in my Mac OS X box?

Cheers.
--
Jonas Alves

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Michael Reece


On May 8, 2007, at 8:17 AM, Matt S Trout wrote:


On Tue, May 08, 2007 at 03:24:15PM +0100, Luis Azevedo wrote:


What I still not understand is why he says RoR isn't MVC O:).


Because their "models" are dumb data objects and they shove all the  
business

logic into what they call the controller.


that depends on the application implementation, does it not?  i  
haven't yet seen anything that prevents putting the business logic  
and 'create_user' code in the ActiveRecord models.  care to elaborate?



This is bloody important for building good application architecture  
- a cron
script or e-mail gateway should be able to invoke e.g. a create  
user function

in the model without ever having to load the web-related code. If your
create user logic is in the controller, you're stuck with either  
talking to the

app over HTTP or simulating a request.


this sort of design misstep can be achieved in Catalyst or RoR, so i  
suspect there must be something more to your story that i'm not getting.



___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Michael Reece


On May 8, 2007, at 8:39 AM, Dave Rolsky wrote:


On Tue, 8 May 2007, Perrin Harkins wrote:
...
One consequence of doing MVC the "right" way, though, is that you  
tend to up with rather large and complex sets of model classes.  
This doesn't bother me, but it's definitely the case that I end up  
with the bulk of my application's code in the model.


indeed.  if we're still talking about RoR, i think http:// 
weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model is a good  
intro to the concept.



___
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] myapp_fastcgi.pl restarter?

2007-05-08 Thread Matt S Trout
On Wed, Feb 14, 2007 at 03:47:53PM -0500, Jim Spath wrote:
> I'm running myapp_fastcgi.pl in static mode under lighttd using and was 
> wondering if there was any sort of handy restarter functionality like 
> myapp_server.pl has.  I didn't see any, meaning that if I make a change 
> to something in lib/ that I need to restart the webserver for the change 
> to take effect.

A bit tardy, but throwing a SIGHUP at the fastcgi handler tends to do the
trick.

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] C:P:Session::Store::FastMmap

2007-05-08 Thread Octavian Rasnita

Hi,

I am trying to install Catalyst::Plugin::Session::Store::FastMmap under 
Windows XP, and on the "nmake test" command it gives the following error. 
Can I do something to be able to install it?

I couldn't find a ppm version of this module.

(I need it because I want to install Task::Catalyst::Tutorial and it 
requires that module.


t/basicok 1/19Truncate of existing share file 
D:\DOCUME~1\octavian\LOCALS~1\Temp\NcQsm5D0gJ failed: The proc

ess cannot access the file because it is being used by another process.
BEGIN failed--compilation aborted at t/basic.t line 15.
t/basicdubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 3-19
Failed 17/19 tests, 10.53% okay
Failed Test Stat Wstat Total Fail  List of Failed
---
t/basic.t  2   51219   34  3-19
2 tests skipped.
Failed 1/4 test scripts. 17/20 subtests failed.

Octavian


___
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] C:P:Session::Store::FastMmap

2007-05-08 Thread Hartmaier Alexander
As far as I picked up, FastMmap is not available on Windows.

-Alex


> -Original Message-
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 08, 2007 6:48 PM
> To: catalyst@lists.rawmode.org
> Subject: [Catalyst] C:P:Session::Store::FastMmap
> 
> Hi,
> 
> I am trying to install Catalyst::Plugin::Session::Store::FastMmap under
> Windows XP, and on the "nmake test" command it gives the following
> error.
> Can I do something to be able to install it?
> I couldn't find a ppm version of this module.
> 
> (I need it because I want to install Task::Catalyst::Tutorial and it
> requires that module.
> 
> t/basicok 1/19Truncate of existing share file
> D:\DOCUME~1\octavian\LOCALS~1\Temp\NcQsm5D0gJ failed: The proc
> ess cannot access the file because it is being used by another process.
> BEGIN failed--compilation aborted at t/basic.t line 15.
> t/basicdubious
> Test returned status 2 (wstat 512, 0x200)
> DIED. FAILED tests 3-19
> Failed 17/19 tests, 10.53% okay
> Failed Test Stat Wstat Total Fail  List of Failed
> ---
> 
> t/basic.t  2   51219   34  3-19
> 2 tests skipped.
> Failed 1/4 test scripts. 17/20 subtests failed.
> 
> Octavian
> 
> 
> ___
> 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/



smime.p7s
Description: S/MIME cryptographic signature
___
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] Help with XMLRPC

2007-05-08 Thread Matt S Trout
On Fri, Feb 16, 2007 at 10:53:13AM -0300, Patricio A. Bruna wrote:
> im trying to start with Catalyst::Plugin::XMLRPC but im having not results 

Catalyst::Plugin::XMLRPC is a miswritten unmaintained nightmare.

DO NOT USE. We cannot and will not support this code.

Catalyst::Plugin::Server obsoletes it. Use that for all new development.

-- 
 Matt S TroutNeed help with your Catalyst or DBIx::Class project?
  Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] C:P:Session::Store::FastMmap

2007-05-08 Thread Octavian Rasnita
I also thought that, but I was able to install Cache-FastMmap-1.15 under 
Windows. (I found about this version on this list).


From: "Hartmaier Alexander" <[EMAIL PROTECTED]>



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


Re: [Catalyst] C:P:Session::Store::FastMmap

2007-05-08 Thread Ash Berlin

Octavian Rasnita wrote:
I also thought that, but I was able to install Cache-FastMmap-1.15 under 
Windows. (I found about this version on this list).


http://perlitist.com/static/Cache-FastMmap-1.15.tar.gz

The author has been in touch with me, and I've made the changes he asked 
for, so hopefully it should be avaiable to CPAN soon.


Ash

___
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] creating action classes for chained actions, trouble with overriding ->match

2007-05-08 Thread Matt S Trout
On Tue, Mar 20, 2007 at 01:15:48PM -0700, John Napiorkowski wrote:
> I may have answered my own question.  A peer pointed me to:
> 
> http://search.cpan.org/src/MRAMBERG/Catalyst-Runtime-5.7007/lib/Catalyst/DispatchType/Chained.pm
> 
> and down in a method called 'recurse_match' it does indeed seem like match is 
> only called against the endpoint in a chain.  So I guess I'd like to find out 
> if anyone knows the reasoning behind this.  I think ideally if an action 
> class can over ride match, this should be allowed for all types of actions.  
> Or I am just not smart enough to know why not :)

Because nobody's implemented match_captures yet which Chained and Regex could
then both call. Should be pretty easy if you fancy a go.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Matija Grabnar

On Tue, 8 May 2007, Perrin Harkins wrote:

The way most people use Rails and Catalyst is somewhat different from
the MVC concept.  The traditional role of the controller is just to
map user input to a method, and nothing more.  All of the business
logic is supposed to be in the model.


But, thinking back to Catalyst docs, when they talk about constructing a 
model,
they mostly just give you the line that will pull in an existing DBIC 
set of classes, not how to make your own model that just calls DBIC (or 
even, doesn't call DBIC at all).


Does anybody know of a place where creating your own model is documented 
in more detail? I'd like to read it.


___
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 make MyApp::B a part of MyApp::A ?

2007-05-08 Thread Oleg Pronin

A good point to start with.

As a more complex solution later maybe one should try to store a hash of
applications ($c) with all surrounding stuff. And make independent component
which will decide which application (i.e. $c) the request is to be
dispatched to.

Ahh, unfortunately im not familiar enough with catalyst's internals to
advice somethin.


2007/5/8, Matt S Trout <[EMAIL PROTECTED]>:


On Tue, May 08, 2007 at 06:13:29PM +0400, Oleg Pronin wrote:
> I think it would be better if it does not.
> Because AppA don't know and don't want to know the templates and models
of
> AppB. They communicate through controllers only.

How about, after setup_components, injcting AppB's ->controllers into
AppA's ->_components hash under 'AppA::Controller::AppB::' and
then
having a tweak in 'sub dispatch' in AppA that, if it sees an AppB::*
controller, reblesses $c into AppB, fiddles req->base and req->path
appropriately, and then calls AppB's ->dispatch.

Bit insane but probably the quickest path to implement this, and without
doing it and seeing what goes wrong I'm not sure we can figure out the
'correct' approach.

--
Matt S TroutNeed help with your Catalyst or DBIx::Class
project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a
quote
http://chainsawblues.vox.com/
http://www.shadowcatsystems.co.uk/

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


Re: [Catalyst] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Matt S Trout
On Tue, May 08, 2007 at 09:09:55PM +0200, Matija Grabnar wrote:
> On Tue, 8 May 2007, Perrin Harkins wrote:
> >>The way most people use Rails and Catalyst is somewhat different from
> >>the MVC concept.  The traditional role of the controller is just to
> >>map user input to a method, and nothing more.  All of the business
> >>logic is supposed to be in the model.
> 
> But, thinking back to Catalyst docs, when they talk about constructing a 
> model,
> they mostly just give you the line that will pull in an existing DBIC 
> set of classes, not how to make your own model that just calls DBIC (or 
> even, doesn't call DBIC at all).
> 
> Does anybody know of a place where creating your own model is documented 
> in more detail? I'd like to read it.

Not yet. I suspect there'll be a chainsawblues series on it at some point
if nobody else gets a good explanation together first.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Christopher Hicks
On Tue, May 08, 2007 at 09:20:32PM +0100, Matt S Trout wrote:
> On Tue, May 08, 2007 at 09:09:55PM +0200, Matija Grabnar wrote:
> > Does anybody know of a place where creating your own model is documented 
> > in more detail? I'd like to read it.
> Not yet. I suspect there'll be a chainsawblues series on it at some point
> if nobody else gets a good explanation together first.

For now the easiest thing seems to be to use the DBIC/CDBI as much as possible. 
 Beyond that and you're basically dealing with Perl OOP which is well 
documented these days and Catalyst internals which are much better documented 
than they once were.

-- 


"The problem with troubleshooting is that trouble shoots back!"

___
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] creating action classes for chained actions, trouble with overriding ->match

2007-05-08 Thread John Napiorkowski

--- Matt S Trout <[EMAIL PROTECTED]> wrote:

> On Tue, Mar 20, 2007 at 01:15:48PM -0700, John
> Napiorkowski wrote:
> > I may have answered my own question.  A peer
> pointed me to:
> > 
> >
>
http://search.cpan.org/src/MRAMBERG/Catalyst-Runtime-5.7007/lib/Catalyst/DispatchType/Chained.pm
> > 
> > and down in a method called 'recurse_match' it
> does indeed seem like match is only called against
> the endpoint in a chain.  So I guess I'd like to
> find out if anyone knows the reasoning behind this. 
> I think ideally if an action class can over ride
> match, this should be allowed for all types of
> actions.  Or I am just not smart enough to know why
> not :)
> 
> Because nobody's implemented match_captures yet
> which Chained and Regex could
> then both call. Should be pretty easy if you fancy a
> go.

Let me see if I understand what the scope of this and
the effect would be.

We'd want a new method on Catalyst::ActionChain called
match_captures which could look something like

sub match_captures
{
   my ( $self, $c, @cap_args ) = @_;
   return 1; ## or 0 to fail to match.
}

Where @cap_args would the actual capture specified via
the attribute 'CaptureArgs(x)'

We'd need to patch this into (I'm guessing) the
recurse_match method for chained dispatch type to make
sure we call this new match method.

Then if you wanted an actionclass for chained actions
that are not endpoints you'd inherit from
Catalyst::ActionChain instead of Catalyst::Action

I'm a bit confused about using this for Regex since
from the source it looks like that dispatch type is
calling the regular match.  Could you please enlighten
me as to your thinking here?

I can see this would work although I am concerned
(maybe for no good reason) that action classes with
match methods wouldn't work as expected if the action
is in the middle of a chain.  So this would reduce re
usability for those action classes.  However this may
not be a problem.  Any thoughts on that?

I have some test for the way I think I'd want this to
work floating around someplace.  I'll dig them up
since that's always a good place to start.

--John

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

___
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] Is it time for a Catalyst Conference yet?

2007-05-08 Thread John Napiorkowski
Hi,

Just a general question to the list to see if there is
interest in getting together a conference dedicated to
Catalyst developers.  Or is the feeling that the
normal Perl conferences cover all our needs?

_john

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

___
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] Is it time for a Catalyst Conference yet?

2007-05-08 Thread Dave Rolsky

On Tue, 8 May 2007, John Napiorkowski wrote:

Just a general question to the list to see if there is interest in 
getting together a conference dedicated to Catalyst developers.  Or is 
the feeling that the normal Perl conferences cover all our needs?


I could definitely imagine a low-key one-day one-track conference (aka, a 
workshop). I don't know that there's enough "stuff" to talk about to 
warrant multiple days or multiple tracks.


I think the biggest problem to overcome is getting enough speakers and 
listeners _in one area_. There's no doubt many Catalyst users around the 
world, but are they willing to fly somewhere to attend a workshop like 
this?


One possibility might be to try to piggyback a "Catalyst day" before/after 
an existing Perl conference like YAPC or OSCON. That way you don't have to 
work as hard to get an audience.



-dave

/*===
VegGuide.Orgwww.BookIRead.com
Your guide to all that's veg.   My book blog
===*/

___
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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-08 Thread Chris

> Does anybody know of a place where creating your own model is documented
> in more detail? I'd like to read it.

Not yet. I suspect there'll be a chainsawblues series on it at some point
if nobody else gets a good explanation together first.

--
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?


Please, yes! It would be very useful to see more examples of current
best-practice.

- Chris

___
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] Tip: Serving Static Files with lighttpd

2007-05-08 Thread Kieren Diment

On 08/05/07, Matt S Trout <[EMAIL PROTECTED]> wrote:


On Fri, Apr 20, 2007 at 10:05:54AM +0200, Bernhard Graf wrote:
> Wherever I looked I only found advice how to serve static files with
> Apache.
>
> Here is the same for lighttpd:

Fantastic. Could you POD this up for a cookbook patch please?



Done :)
___
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] C:P:Session::Store::FastMmap

2007-05-08 Thread Octavian Rasnita

From: "Ash Berlin" <[EMAIL PROTECTED]>


http://perlitist.com/static/Cache-FastMmap-1.15.tar.gz

The author has been in touch with me, and I've made the changes he asked 
for, so hopefully it should be avaiable to CPAN soon.


Ash


Yes, this version is the one I've installed, but I cannot install
Catalyst::Plugin::Session::Store::FastMmap

It gives errors on "nmake test" and I don't know if it is a good idea to 
force install it.


Octavian



___
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] Is it time for a Catalyst Conference yet?

2007-05-08 Thread Thomas Klausner
Hi!

On Tue, May 08, 2007 at 05:13:03PM -0500, Dave Rolsky wrote:

> >Just a general question to the list to see if there is interest in 
> >getting together a conference dedicated to Catalyst developers.  Or is 
> >the feeling that the normal Perl conferences cover all our needs?
> 
> ..
> 
> One possibility might be to try to piggyback a "Catalyst day" before/after 
> an existing Perl conference like YAPC or OSCON. That way you don't have to 
> work as hard to get an audience.

BTW, this is basically what we try to achieve with the Hackathons at 
YAPC::Europe: Give certain projects time and place to do a 
"Mini-Conference / Workshop" embedded in the YAPC:
  http://vienna.yapceurope.org/ye2007/cfh.html


-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}

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