Re: [Catalyst] More Catalyst Template Toolkit examples?

2008-05-03 Thread Andreas Marienborg


On May 3, 2008, at 3:52 AM, Ryan Grace wrote:


Hi All,

I'm working my way through the Catalyst tutorial and am currently in  
Part* Advanced CRUD.  In this section HTML::Widget is introduced,  
along with examples of using TT2 with H::W.


One line in an example of a TT2 template near the bottom of the page  
uses:


[% FOREACH element = widget_result.elements %]


I'm having a hard time figuring this out because I can't find  
mention of the

.elements method anywhere.

Does someone have a pointer to more advanced examples of using TT2  
with H::W and Catalyst?


Or a pointer to documentation about the available options in  
C::P::H::W?  .elements isn't mentioned in the H::W documentation  
anywhere that I can find.


Your widget_result is an object of the class HTMl::Widget::Result.

http://cpansearch.perl.org/~cfranks/HTML-Widget-1.11/lib/HTML/Widget/Result.pm#elements

I would recommend trying to use for instance HTML::FormFu instead of  
HTML::Widget, as HTML::Widget is no longer activly maintained



- andreas

___
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: Fw: high school reunion [Catalyst] (no subject)

2008-05-03 Thread Matt S Trout
Unsubscribed and banned. Bai.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
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] So, what do we want in the -next- book?

2008-05-03 Thread Matt S Trout
On Tue, Apr 29, 2008 at 01:00:47PM -0400, Dave Baker wrote:
 I have enjoyed the Catalyst book, although the publisher has been 
 unacceptably slow at publishing errata I've submitted to its web page, 
 so I'd like to see more like it.

Packt are complete idiots; community errata link here:

http://catwiki.toeat.com/thebook

Don't even waste your time submitting to them, just hassle them to link
to the real errata list we've collected :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
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] Kill the book thread please

2008-05-03 Thread Matt S Trout
There's about four different conversations going on on it now.

Please anybody who considers one of those conversations worth keeping
start a fresh thread with a more accurate subject. It'll make the conversation
saner.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
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] So, what do we want in the -next- book?

2008-05-03 Thread Chris Weyl
On Tue, Apr 29, 2008 at 10:02 AM, Peter Corlett [EMAIL PROTECTED] wrote:
 On Tue, Apr 29, 2008 at 11:34:57AM -0500, Jonathan Rockway wrote:
   * On Tue, Apr 29 2008, Peter Corlett wrote:
  [...]

  Right, and I need to read the entire Linux and libc source code to be
   able to write a Unix application.
   It will help, yes.

  It may well help, but it is not necessarily the best approach. The source
  code to a library is too low-level for a user of the library to really get a
  grip on how all the pieces fit together and are intended to be used.

Perhaps oddly, with Perl I've often found reading the _tests_ to be
more helpful than wading through the source of a library, particularly
if it builds on top of other code.  (Of course, this presupposes a
good test suite, but...)

   -Chris

-- 
Chris Weyl
Ex astris, scientia

___
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] modperl 1.3 wierdness

2008-05-03 Thread Matt S Trout
On Mon, Apr 28, 2008 at 11:30:53AM +1000, Toby Corkindale wrote:
 Unfortunately due to somewhat unusual app deployment tactics here, apps get
 installed manually, into their own little area, along with their required
 perl dependencies, thus losing the Makefile.PL, but also requiring that the
 config file lived in the same non-standard location.

How about using

__PACKAGE__-config(
  'Plugin::ConfigLoader' = {
file = __PACKAGE__-path_to(...)
  }
);

or setting an environment variable?

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

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

2008-05-03 Thread Matt S Trout
On Tue, Apr 29, 2008 at 02:41:26AM -0500, Andrew Rodland wrote:
 Questions!
 
 1) What is the preferred name for the Catalyst website? I thought that at one 
 point we were leaning toward sticking with catalyst.perl.org, but all the nav 
 links are for catalystframework.org. One way or another I think the site 
 should be clear on what it's named, and send a Moved Permanently redirect to 
 the preferred address when accessed using the nonpreferred address.

Let's have a separate thread if we're going to argue about this one.

 2) Will the new wiki go live[1] at its current toeat.com address or at 
 $answer{'Question 1'} . /wiki/?

It'll go live on dev. as soon as jshirley/I find tuits to do so.

 3) Can we have a link to thebookerrata on the front page with the book link, 
 where newbies are likely to find it? Something to the tune of Having 
 trouble? Click here for important information on the Catalyst book. I will 
 happily submit patch to the website if this is not shot down.
 
 4) Thoughts on improving the website in general? It's nice, but not very 
 filling, and I don't think it gets a lot of love. Again, I'd be happy to 
 help. Maybe this should wait for the new wiki though? I'm thinking that 
 either we would want to highlight some of the most important wiki articles 
 from the website, or else the wiki could end up being most of the website, 
 since it's powered by hierarchical fairy dust.

I believe #catalyst-site is the location for the working party.

Please nobody join that channel unless you're planning to implement;
bikeshedders unwelcome and can expect to be banned.

Commit bits to the site can be given out very easily; if you can't find
anybody else to do it kick me.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical Directorhttp://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/http://www.shadowcat.co.uk/servers/

___
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] RFC: Catalyst::Controller::REST::DBIC

2008-05-03 Thread luke saunders
I have started to write a Catalyst base controller for REST style CRUD
via DBIC. I have noticed that a number of other people have been
working on or are thinking about working on something similar, most
notabley J. Shirley who seems to be creating
Catalyst::Controller::REST::DBIC::Item
(http://dev.catalystframework.org/svnweb/Catalyst/browse/Catalyst-Controller-REST-DBIC-Item/)
and some chaps from a recent thread on this list (entitled
Dispatching with Chained vs HTTP method).

Ideally I would like to merge J. Shirley's effort into mine (or visa
versa) along with anything that anyone else has. Basically I want to
avoid ending up with a load of modules that all do the same thing.

My effort is heavily based on something mst wrote a while ago, and
since then I've ended up writing something very similar for every
project I've worked on which indicates it's worth OSing. Essentially
it is used like so:

  package MyApp::Controller::API::REST::CD;

  use base qw/Catalyst::Controller::REST::DBIC/;

  ...

  __PACKAGE__-config
( action = { setup = { PathPart = 'cd', Chained =
'/api/rest/rest_base' } },
  class = 'RestTestDB::CD',
  create_requires = ['artist', 'title', 'year' ],
  update_allows = ['title', 'year']
  );

And this gets you the following endpoints to fire requests at:
/api/rest/cd/create
/api/rest/cd/id/[cdid]/update
/api/rest/cd/id/[cdid]/delete
/api/rest/cd/id/[cdid]/add_to_rel/[relation]
/api/rest/cd/id/[cdid]/remove_from_rel/[relation]

The full source is here:
http://lukesaunders.me.uk/dists/Catalyst-Controller-REST-DBIC-1.00.tar.gz

If you have a few moments please have a look, especially if you are
working on something similar. Today I even wrote a test suite which
has a test app and is probably the best place to look to see what it
does.

Note that it lacks:
- list and view type methods which dump objects to JSON (or whatever)
- clever validation - it should validate based on the DBIC column
definitions but it doesn't
- any auth - not sure if it should or not, but it's possible

Also it doesn't distinguish between POST, PUT, DELETE and GET HTTP
requests favouring instead entirely separate endpoints, but that's up
for discussion.

So, J. Shirley, do you have any interest in a merge? And others, do
you have ideas and would you like to contribute?

Thanks,
Luke.

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