Re: [Catalyst] Catalyst and chrome url (xul)

2007-09-23 Thread Jonathan Rockway
Javier E. Perez P. wrote:
 Hi all,

 I'm trying to display xul elements in a page in my proyect in catalyst,
 i already change the http header content_type to text/xml, but comparing
 the result with the same file published with apache (no-catalyst) and
 making use of firebug, i realize that the global.css file isn't the
 same, why this happen? how can i fix it?

 Thanks beforehand

Some more details would be helpful.  We have no idea what global.css
is.  What is it?  Where are you serving it from?  What is Catalyst doing
with this file?  What is different between the Apache and Catalyst
versions?  Answering these questions will make it easier to help you. 

One suggestion I have is to read the docs for
Catalyst::Plugin::Static::Simple.  That shouldn't do any munging,
though, so I'm at a loss as to why the file would be different.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Catalyst::Model::Search

2007-09-21 Thread Jonathan Rockway
Peter Karman wrote:
 I see Catalyst::Model::Search on CPAN now. As the maintainer of
 Catalyst::Model::SWISH, I'd love to get in on that namespace action. Is
 Catalyst::Model::Search intentionally undocumented? Are there plans for a
 formal API to which subclasses of Catalyst::Model::Search must adhere?
   

People can upload whatever they want to CPAN for any reason with any
name :)  Please mail the maintainer directly and collaborate with him. 
If there's something seriously wrong with the module (no docs for an
important namespace like Search is a good reason), please let the core
team know on the dev list, and we'll do what we can to make sure the
users of the module have the best experience possible.

Collaboration is the key.  Modules that one guy uploads to the CPAN on a
whim are rarely useful.

Finally, what do you envision for the ::Search namespace?  A common
interface to various search mechanisms?

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Can't find my canary

2007-09-21 Thread Jonathan Rockway
Dennis Daupert wrote:
 Did your fix not get to git yet?

It's there now.  On my machines, Session::State::Cookie still isn't
working, so tests fail for me.  But if they pass for you, you should be
good to go.

I will work on fixing Session::State::Cookie today.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Catalyst::Model::Search

2007-09-21 Thread Jonathan Rockway
Peter Karman wrote:
 The C::M::Search package is under Marcus Ramberg's acct, though the author
 listed in the POD is Andy Grundman. Since both those gentlemen are core devs, 
 I
 figured this list was as good as any, especially since the resulting
 conversation might be of interest to all Catalyst users. But I'll write to 
 them
 directly as you suggest.

Ah, I should look at modules before I assume :)  I'm sure Marcus and
Andy have everything under control.  The dev list is still a fine place
to discuss your plans for extending the module, though.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Can't find my canary

2007-09-20 Thread Jonathan Rockway
On Thu, 2007-09-20 at 08:43 -0700, Dennis Daupert wrote:
 I have a problem trying to use Catalyst::Plugin::FormCanary.

Two things.  First is, FormCanary is a hack.  It would be better to let
your form validation system handle canary injection and verification.
FormCanary isn't going to work very well for AJAX.  (Maybe I will add an
API method $c-get_canary_html or something, but taking a bad idea even
further might be ... bad :)

However, if FormCanary's munging is appropriate for your application,
wait a bit for me to release 0.02.  It turns out that the body is now
sent before finalize_session gets to inject the canary.  I have fixed
this locally but still have the verification test failing because
C::P::S::S::Cookie is broken on all my machines.  You can get my body
fix from git, though, and see if that works on your machine.

(git == git clone git://git.jrock.us/Catalyst-Plugin-FormCanary, or
http://git.jrock.us if you want a tarball.)

BTW, did the tests originally pass for you?  If they did and the module
doesn't work, I would be interested in hearing more about that.

Regards,
Jonathan Rockway


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


Re: [Catalyst] Audit logs: model or controller?

2007-09-17 Thread Jonathan Rockway
Charlie Garrison wrote:
 You're looking for ACCEPT_CONTEXT. Took me a while to get the right
 setup so that it did what I needed but works great now. I couldn't
 find *one* complete example that showed me how to best implement it,
 but after looking at various examples I was able to pick out the bits
 that worked for my app. I ended up with something very close to this
 http://article.gmane.org/gmane.comp.web.catalyst.general/11887.

 Best practices say to only store the info from $context that you need
 in your model rather than a reference to $context itself. IOW, if you
 just need the current user object, then just store that. I don't
 recall the reasoning for it though.

You can try mixing in Catalyst::Component::ACCEPT_CONTEXT.  It will
handle the ACCEPT_CONTEXT magic and provide $c as $self-context for
you.  The reason for not storing $context in your model is because it
will create a circular reference if you're not careful. 
Catalyst::Component::ACCEPT_CONTEXT is careful, so you don't need to
worry about that. :)

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Some guidance needed please

2007-09-13 Thread Jonathan Rockway
Ian Docherty wrote:
 As I mentioned, if I try to do a call to
 $c-model('DBIC::UsedPassword')-create_limited( ... ); I get the
 fatal error

 Can't locate object method create_limited via package
 DBIx::Class::ResultSet

 Which is why I think this is not the approach, unless you know otherwise?

I'm not sure I would structure the code exactly like you did.  I think I
would add a method to the User class like:

  package My::Schema::User;
  ...
  sub set_password { txn_do(update current password, update used
passwords) }

Then you can say something like:

  $c-model('DBIC::Users')-find(42)-set_password('foobarbaz');

and have everything work.

Finally, if you want your create_limited to work, try:

  package My::ResultSet::UsedPassword;
  use base 'DBIx::Class::ResultSet';
  sub create_limited { ... };

  package My::Schema::UsedPassword;
  __PACKAGE__-resultset_class('My::ResultSet::UsedPassword');

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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/


[Catalyst] more catalyst talks

2007-09-12 Thread Jonathan Rockway
Hi all,

I have another Catalyst talk up at:

  http://www.jrock.us/doqueue-grr/start.html

The talk is for beginners of Catalyst, but it covers building a full
application (doqueue) in just under an hour (and unfortunately omits
some stuff, but there's only so much you can do in an hour).  doqueue is
a web 2.0 (heh) site that I'll probably be launching soon, but the
full source is available at:

   http://git.jrock.us/?p=doqueue.git;a=summary

BTW, I don't think I ever announced my YAPC::NA talks to the list, so if
you haven't seen those, they're linked to from http://www.jrock.us/ and
the Catalyst wiki.

Finally, if your Perl Mongers group is interested in hearing one of
these talks in person, I can probably come out and give one.  Mail me
off-list for details.

Regards,
Jonathan Rockway




signature.asc
Description: OpenPGP digital 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] + in GET param

2007-09-12 Thread Jonathan Rockway
::SASL::Perl::EXTERNAL'  = '1.03',
'Authen::SASL::Perl::GSSAPI'= '0.02',
'Authen::SASL::Perl::LOGIN' = '1.03',
'Authen::SASL::Perl::PLAIN' = '1.04',
'Crypt::SSLeay::Conn'   = 'undef',
'Crypt::SSLeay::Err'= 'undef',
'Crypt::SSLeay::MainContext'= 'undef',
'Crypt::SSLeay' = '0.56',
'Path::Class::File' = 'undef',
'Path::Class::Dir'  = 'undef',
'Path::Class::Entity'   = 'undef',
'URI::_foreign' = 'undef',
'URI::_generic' = 'undef',
'URI::WithBase' = '2.19',
'URI::Escape'   = '3.28',
'URI::_segment' = 'undef',
'URI::_userpass'= 'undef',
'URI::_server'  = 'undef',
'URI::_ldap'= '1.10',
'URI::_query'   = 'undef',
'URI::_login'   = 'undef',
'Mail::Util'= '1.77',
'Mail::Mailer'  = '1.77',
'Mail::Address' = '1.77',
'Catalyst::Test'= 'undef',

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] + in GET param

2007-09-11 Thread Jonathan Rockway
Gavin Henry wrote:
 quote who=[EMAIL PROTECTED]
   
 That's what uri_for is already doing (I forgot to mention I'd checked
 already).

 uri_for:

 http://myserver.com/blah/?username=first.last%2Bme%40gmail.com

I haven't looked into this at all, but try using a chained action
instead.  I think that bypasses unescaping for whatever reason, and that
may be exactly what you need here.  If this breaks horribly in the
future, though, don't blame me.  I consider the chained behavior a bug
(but I'm waiting for mst to tell me why it isn't).

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] TT and UNICODE: Garbled special characters

2007-09-06 Thread Jonathan Rockway
Daniel McBrearty wrote:
 It seems to me that Template-Toolkit does no UTF-8-encoding of the
 outputted variables.
 

 well, it shouldn't.

 In perl, strings are already utf8, internally. If TT was to do
 encoding, they would be double-encoded.
   

The internal encoding that perl uses is none of your business and has no
relevance to anything. :)  It can be changed at any time, and your
software is extremely unreliable if it depends on it (and nobody wants
that).  Here's my usual advice about unicode:

 * use utf8 if and only if your source code is utf-8 encoded.
 * Encode::decode() every piece of data that comes from outside your
program.  If you have utf8-encoded data and you forget to do this,
you'll end up with double-encoded data when perl implicitly upgrades it
to utf8.  By default, text is latin-1.  Here's a simulation of what
happens when the octet string 日本語 is implicitly upgraded:

 $ recode latin1..utf8
 日本語
 æ¥æ¬èª

* Encode::encode() your perl strings to utf-8 right before you print
them to a utf-8 terminal or web browser.  If you try to print the raw
strings, you'll see this error (sometimes; when the characters aren't in
latin-1):

 $ perl -e 'syswrite *STDOUT,\x{CAFE}\n'
 Wide character in syswrite at -e line 1.

encoding::warnings will tell you when something wonky is happening
with your code.  In your case, remember that you need to make sure all
these things are decoded before using them as text:

 * database data
 * templates themselves
 * data the user enters in via a form
 * url params
 * filenames
 * file values (but not if they're binary)
 * etc.

HTH.  Good luck.

Regards,
Jonathan Rockway




signature.asc
Description: OpenPGP digital 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] Re: Catalyst::Plugin::DBIC::QueryLog

2007-09-04 Thread Jonathan Rockway
Fayland Lam wrote:
 see attachment. check if it's OK?

 now it's not per request any more. hmm, after several requests,
mst wrote:
 That's trivial with Catalyst::Component::InstancePerContext.

He intended for you to use that. 

It implements the per-request magic for you with some clever use of
ACCEPT_CONTEXT and the stash.  Basically, it calls your builder method
if you don't already have an instance in $c-stash.  Since that gets
cleared every request, you get your per-request.

So, try again :)  You're almost there :)

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Re: [Catalyst-dev] Ignoring Emacs temp files

2007-08-30 Thread Jonathan Rockway
Matt Rosin wrote:
 Ouch. I use xemacs -nw and FindBin but haven't seen this explosion, I
 think. What autodiscovery are you using that makes it require
 Foo:::#Bar ?

Basically find | egrep 'pm$'.  I thought it would be safer to filter
on a regex like ^\w+[.]pm$ since the docs say that modules can only be
named like that, but of course, people are ignoring that in real life. 
For an example, see 日本語.pm: 
   http://www.slideshare.net/mac/perl-programming-in-japanese

Thus it's probably better to include everything and exclude the known-bad.

Regards,
Jonathan Rockway




signature.asc
Description: OpenPGP digital 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/


[Catalyst] (en) error screen translations

2007-08-30 Thread Jonathan Rockway
Should I apply these extra translations from $A_LONG_TIME_AGO?

http://grokbase.com/post/2006/04/29/catalyst-translations-for-error-message/mJp7PqYdMOElr-7JEF-m4SjP7B0

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] (en) error screen translations

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

 http://lists.scsys.co.uk/pipermail/catalyst/2006-May/007342.html
   
Here's the list:

(en) Please come back later
(fr) SVP veuillez revenir plus tard
(de) Bitte versuchen sie es spaeter nocheinmal
(at) Konnten's bitt'schoen spaeter nochmal reinschauen
(no) Vennligst prov igjen senere
(dk) Venligst prov igen senere
(pl) Prosze sprobowac pozniej
(pt) Por favor, volte mais tarde
(ja) 後ほどお越しください
(el) Παρακαλούμε ξαναελάτε αργότερα.
(ro) Vă rugăm să reveniţi mai târziu.
(he) אנא שובו במועד מאוחר יותר
(cn) 请稍后再来
(lb) Kommt w.e.g. spéider nach eng Kéier zeréck.
(bg) Моля, опитайте след малко
(bø) børk børk børk!


Anything else?  The thought has occurred to me that we should order
these by popularity.


signature.asc
Description: OpenPGP digital 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/


[Catalyst] Re: [Catalyst-dev] Ignoring Emacs temp files

2007-08-27 Thread Jonathan Rockway
Kieren Diment wrote:
 Applied (changeset 6741 and 6742 - don't ask) , thanks :-)

 On 27/08/07, Dave Rolsky [EMAIL PROTECTED] wrote:
   
 When you're editing a buffer in emacs, it will create a temporary symlink
 in the same directory of the file in the form .#filename.
Thanks kd++ and autarch++ :)  This has been an open issue for over a
year because we've been waiting for users to compile a list for every
editor and patch MPO accordingly.  I only use emacs, so all I could
provide was similar to Dave's patch.  With this applied, I am happy :)

Users of other editors: we weren't kidding when we asked you for regexes
that exclude your editor's cruft files.  They all do it, but I don't
have any of them so I don't know what the files are.  Please send data.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Re: A Perl Message Queue?

2007-08-26 Thread Jonathan Rockway
A. Pagaltzis wrote:
 * Jonathan Rockway [EMAIL PROTECTED] [2007-08-25 05:15]:
   
 When you write your own message queue that actually works
 correctly, is supported and documented, and is available freely
 on the CPAN, you can pick the name. In the mean time, STFU.
 

 If I told a client that I intend to use “TheSchwartz”, they’d
 look at me like I’d grown a third head.

Then don't tell them that.  Fork it and call it something else, or
better, don't take on such bone-headed clients.

Regards,
Jonathan Rockway





signature.asc
Description: OpenPGP digital 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] Should CATALYST_DEBUG suppress manual calls to $c-log-debug()?

2007-08-24 Thread Jonathan Rockway
Will Hawes wrote:

 Is my mistake in misunderstanding how $c-log-debug() is supposed to
 work? Or is it likely that I've somehow overridden CATALYST_DEBUG
 elsewhere?

It is indeed.  $c-log-debug() has nothing to do with CATALYST_DEBUG.  Try:

  $c-log-debug('Hello') if $c-debug;

I think the reason for this is so that if you have sub MyApp::debug { 0
}, the call to debug is completely optimized away at compile time... but
I'm not sure this works for method calls (or even MyApp-debug, although
MyApp::debug would work correctly).

Someone else will explain what's actually going on.  I've had too much
to drink tonight :)

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] A Perl Message Queue?

2007-08-24 Thread Jonathan Rockway
Bernhard Graf wrote:
 Don't know about TheSchwartz (btw. what a stupid name)

When you write your own message queue that actually works correctly, is
supported and documented, and is available freely on the CPAN, you can
pick the name.  In the mean time, STFU.   Thanks.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] New website using Catalyst

2007-08-21 Thread Jonathan Rockway
Evaldas Imbrasas wrote:
 Hi,

 I would like to annouce the launch of a new website using Catalyst
 (along with DBIC and Template Toolkit):

 EVO: eco-friendly products, services, and information
 http://www.evo.com/

 Big thanks to Catalyst developers for providing such a great framework
 that made the development process so much more efficient and fun.

 Please feel free to add our website to the growing list of websites
 using Catalyst at http://dev.catalyst.perl.org/ .
   

Looks like a cool site.  I added it to
http://dev.catalystframework.org/wiki/LiveApplications

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] access stash outside methods

2007-08-21 Thread Jonathan Rockway
Aditya Verma wrote:
 Hi All,

 I want all of my controllers to register there respective URLs with
 description. this data will be used in template to create dynamic HTML
 pages.
 controllers will register URLs at catalyst startup.

 I have to store this data into variable (not in any file or database)
 which will be accessible in all the controllers.
 To get the registration work I have to write statement outside of all
 controller methods to execute the same at the time of catalyst startup. 

How about using attributes?

   pacakge MyApp::Controller::Anything;
   use base 'MyApp::Controler::HasDescription';
  
   sub some_action
  :Path :Args(1) :URL('/some_action/*') :Description('Some
action!') {
  # your action
   }
   # etc.

Those get parsed at startup time, and you can probably shove them in
$app-config or somewhere similarly convenient.  You can also just walk
all actions and look for the URL and Description attributes.  This is
pretty easy to do, but I don't know the details so I will let you glean
them from the code/docs. $c-action_for('/some_action')-attributes
should be close.  Have fun.

Regards,
Jonathan Rockway






signature.asc
Description: OpenPGP digital 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] Rate limiting password attacks

2007-08-18 Thread Jonathan Rockway
Antano Solar wrote:
 I was just wondering why can't the form fields for username and
 password be changed after every x attempts. And the post data checked
 for the new fields.


This is a good approach, and is automatic if you use the FormCanary or
RequestToken plugins.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Catalyst::View::Templated

2007-08-18 Thread Jonathan Rockway
Jonathan Rockway wrote:
 and I'll probably convert ClearSilver over tonight also.

   The uploaded file
   
   Catalyst-View-ClearSilver-0.02.tar.gz
   
   has entered CPAN as
   
  file: $CPAN/authors/id/J/JR/JROCKWAY/Catalyst-View-ClearSilver-0.02.tar.gz
  size: 4815 bytes
  md5: 835407536b0e45d8655d3acd7d83d708


This release isn't installable from the CPAN shell (since nobody on the
Catalyst team has permission to use the namespace), but it fixes all
known bugs and adds all of the standard Templated features (and some
tests).  Please test and let me know what else needs to be fixed.

Regards,
Jonathan Rockway



signature.asc
Description: OpenPGP digital 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] Rate limiting password attacks

2007-08-17 Thread Jonathan Rockway
Bill Moseley wrote:
 What's the status of the Cache plugin(s) wrt. backends?

 I want to be able to swap between FastMmap and Memcached via a config
 option
As per the docs:

# configure a backend or use a store plugin 
__PACKAGE__-config-{cache}{backend} = {
class = Cache::FastMmap,
# ... params ...
};

or

# configure a backend or use a store plugin 
__PACKAGE__-config-{cache}{backend} = {
class = Cache::Memcached::Managed,
# ... params ...
};


Feel free to refactor that however you like.  But the idea is that
C::P::Cache doesn't care what backend you use.

Regards,
Jonathan Rockway

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


Re: [Catalyst] improving usability / doc

2007-08-16 Thread Jonathan Rockway
Adam Bartosik wrote:
 How many people decided to take different framework just because
 catalyst doc still sucks?
Sucks is somewhat hurtful to the many contributers, but whatever, I
see what you mean.

There has been talk of putting the POD on our site and making it look
nicer (search.cpan.org's navigation sucks).  There has been talk of
taking good articles from Planet Catalyst and giving them cleanup and a
permanent home.  There has been talk of putting the Planet Catalyst feed
on the main site.  There has been talk of completely revamping the
design.  There has been talk of getting a team of happy wikignomes to
polish up the wiki.

The recurring theme is that /this is all talk/. 

Someone needs to Just Fucking Do It.  Implement the things above, and
I'll buy you a case of your favorite beer.  If someone commits, I will
move up the mojomojo migration on my priority list, so we can have some
decent software running the wiki.  

With gnomes to tend the wiki, the upcoming book, prettyified API docs,
and a front page with more information, I think we'll have the best
offering of any framework.  Momentum is what we need, and right now
there is none.  We need someone to commit to getting this stuff done (or
even starting!) some time before the heat death of the Universe.  So the
deal is, if you do this stuff, I will give you beer (is $50 reasonable? 
it is to me). 

I will help out with anything that doesn't involve HTML or design.  Let
me know what you need, and I will help you get it.  Others share the
same sentiment.

Let's do this.

Regards,
Jonathan Rockway


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


Re: [Catalyst] Anybody else OSCONing?

2007-07-21 Thread Jonathan Rockway
On Friday 20 July 2007 08:31:26 pm Matt S Trout wrote:
 While I know of a few names who are, I bet there are more on here I don't
 know about and that a lot of us don't know about each other, so put your
 names here and let's see if we can meet up for a beer and some software
 hate.

I'm going to be there Sunday-Saturday.  If anyone wants to meet up downtown on 
Sunday night, let me know.

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


signature.asc
Description: This is a digitally signed message part.
___
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] setup_home() bug

2007-07-20 Thread Jonathan Rockway
On Friday 20 July 2007 06:27:22 pm Adam Herzog wrote:
 On Jul 20, 2007, at 5:47 PM, Jonathan T. Rockway wrote:
  Thanks for the patch, it looks great.  The only problem is that your
  mail client seems to have wrapped some long lines, and even when I
  manually fix it Cpatch is unable to apply the patch.

 But... but... the longest line is only 79 chars. Stupid mail client.
 *shakes fist angrily*

 Anyway, patch attached.

Thanks!  Applied as r6589.  Hopefully it will be on CPAN Real Soon Now.

Regards,
Jonathan Rockway

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


signature.asc
Description: This is a digitally signed message part.
___
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] Argument escaping with chained actions

2007-07-18 Thread Jonathan Rockway
On Wednesday 18 July 2007 03:13:17 pm Todd Holbrook wrote:
 Something I'm missing, or is this a bug?

I think what you're seeing is a bug in everything except Chained.  By the time 
you're handling args in Catalyst you shouldn't have to worry about unescaping 
stuff, right?  I know this problem has come up before, but I forget if we 
ever reached a consensus on what the correct behavior is.

It's possible that we didn't change the behavior of everything else because it 
would break old apps... but Chained was brand new so it could be done right.   
Who knows...

Regards,
Jonathan Rockway

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


signature.asc
Description: This is a digitally signed message part.
___
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] Authentication Store: DBC vs DBIx::Class

2007-07-17 Thread Jonathan Rockway
On Tuesday 17 July 2007 02:02:20 pm Jim Spath wrote:
 We use DBIx::Class for our model and the DBIC module for authentication
 currently.

Just to clarify, DBIC and DBIx::Class are the same thing.  DBIx::Class is a 
lot to type, so modules that work with DBIx::Class are often called 
something::DBIC.  The new auth plugin is called ::DBIx::Class because 
the ::DBIC name was already taken.

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


signature.asc
Description: This is a digitally signed message part.
___
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] TT2 + CP::Authentication + DBIC gotcha

2007-07-14 Thread Jonathan Rockway
On Friday 13 July 2007 02:08:51 pm Christopher Heschong wrote:
 What about:

 my $vote = $bar and $foo;


Well, it's the same as:

  $foo if my $vote = $bar;  

Which is a useless use of $foo in void context.

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


signature.asc
Description: This is a digitally signed message part.
___
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] html::prototype syntax in new Cat version

2007-07-11 Thread Jonathan Rockway
On Tuesday 10 July 2007 12:02:39 pm J. Shirley wrote:
 Right, and the people who use prototype are aware of the deficiencies
 and work around them.  They're not asking for support :)  Marcus is a
 smart guy, as evidenced continuously, but I'll never know why he uses
 prototype :)

Likely because none of the other frameworks existed when he was getting 
started with MojoMojo.

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


signature.asc
Description: This is a digitally signed message part.
___
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] prefetch specific columns

2007-07-10 Thread Jonathan Rockway
On Sunday 08 July 2007 08:19:43 am vti wrote:
 Hello.

 Is there any way when using 'prefetch' attribute to specify which columns
 to get from db? Or is there any low-level way to change SQL before doing
 any fetches?

Could you give us a bit of information on what you're trying to do?  What 
Model are you using?  DBIC::Schema?

If you're using DBIx::Class, a better place to ask your DBIC questions is on 
the DBIx::Class mailing list:

http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class

BTW, I have a hunch that you want is:

  $rs-search({ ... }, 
{ join   = [qw/relationship_name/], 
  columns = [qw/foo bar relationship_name.baz .../],
 });

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


signature.asc
Description: This is a digitally signed message part.
___
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: How to access current MyApp instance ?

2007-07-04 Thread Jonathan Rockway
On Sunday 01 July 2007 02:27:17 pm A. Pagaltzis wrote:
 Of course, we’ve known since the ’70s or so how to make better
 programming languages, but ABW considers templating languages
 to be totally different from programming languages, so you get
 to be transported back to the ’60s.

I agree that this is a terrible way to do things.  Perl has the right idea 
with $sigils, so at least functions look different from other @things.  Oh, 
and you know... a lexical scope.

I've personally been burned with this in ircxory*:

[% MACRO thing(thing) BLOCK %] 
a class=thing href=[% c.uri_for('/things',thing) | html%]
  [% thing | html %]/a
[% END %]

Then:
ul
[% WHILE (thing = things.next) %]
  li[% thing(thing.name) %] [% score(thing.score) %]/li
[% END %]
/ul

Oops, that breaks.  

Now my variables have really icky names to work around that, but it has made 
me consider ditching TT.  Unfortunately I don't like the alternatives 
either :)  Maybe T::Declare...

* http://git.jrock.us/?p=ircxory.git;a=summary or git clone 
git://git.jrock.us/ircxory

Regards,
Jonathan Rockway

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


signature.asc
Description: This is a digitally signed message part.
___
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] html::prototype syntax in new Cat version

2007-07-04 Thread Jonathan Rockway
On Thursday 28 June 2007 07:33:57 am vb wrote:
  HTML::Prototype is the Matt's Script Archive of javascript.

 possible, but don't confuse with  prototype.js.

Same difference.  The Prototype + Scriptaculous javascript framework is junk.  
It doesn't work very well, the syntax is terrible, it will break other 
javascript on the page just by being included, and the cool effects it 
includes aren't even very good.  There is absolutely no reason to use 
Prototype.

Mochikit, Dojo, Mootools, Jquery, etc. will treat you much better.  (I like 
Jemplate also, but that's not a framework per-se'.)

 A solution: use prototype.js as is, and not from HTML::Prototype!

This is the right idea.  Put your javascript in .js files, include those in 
the page, etc.  Catalyst/Perl doesn't need to deal with your Javascript.  
Just treat it as static content (the library) or HTML (hooks in the 
document).

If you want AJAX stuff, I recommend building a JSON/REST interface with 
Catalyst::Action::REST and using one of the above frameworks to talk to it.  
With Jemplate, you can render your TT templates client-side, which is always 
fun.

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


signature.asc
Description: This is a digitally signed message part.
___
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] preventing Cross Site Request Forgery

2007-06-19 Thread Jonathan Rockway
Hello cata-listers,

I was reading an article about CSRF last night:

http://www.25hoursaday.com/weblog/2007/06/05/WhatRubyOnRailsCanLearnFromASPNET.aspx

and realized that Catalyst is just as vulnerable as Rails.  So, I wrote 
Catalyst::Plugin::FormCanary to solve the problem.  If you care about CSRF, 
get it from CPAN, load it into your app, and stop worrying :)

It's sort of unpolished right now (see the TODO section) but it does work, 
(even with FormBuilder), and it fails in a secure state instead of an 
insecure state.  It has good test coverage, so if you feel like fixing 
something in the TODO list write a test, fix it, and send me a patch.

Enjoy!

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] :Template() Attribute

2007-06-19 Thread Jonathan Rockway
On Sunday 17 June 2007 01:22:30 pm Jonathan Rockway wrote:
 On Sunday 17 June 2007 01:02:52 pm Christopher H. Laco wrote:
  Well, if we're throwing things in the ring...
 
  C::View::Templated
 
  -template()
 
  And some forms of:
 
  -template_paths(\@)

 I like this.  Should we put this in a separate package, or right in
 C-Runtime?

 Incidentally, you could do $c-view-template('...')* instead of
 $c-stash-{template}, which looks pretty nice.

 * or $c-view('View::TT')-template('...') if you don't like default_view.

Replying to myself... I am also going to add a process method that calls 
render.  That way, as a template view implementor, you only need to make 
render work, and the rest will be taken care of for you.  Convenient.

Anything else I am forgetting?

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

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


Re: [Catalyst] :Template() Attribute

2007-06-17 Thread Jonathan Rockway
On Sunday 17 June 2007 01:02:52 pm Christopher H. Laco wrote:

 Well, if we're throwing things in the ring...

 C::View::Templated

 -template()

 And some forms of:

 -template_paths(\@)


I like this.  Should we put this in a separate package, or right in C-Runtime?

Incidentally, you could do $c-view-template('...')* instead of 
$c-stash-{template}, which looks pretty nice.

* or $c-view('View::TT')-template('...') if you don't like default_view.

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

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


[Catalyst] Re: [Catalyst-dev] Proxy patches

2007-06-17 Thread Jonathan Rockway
On Sunday 17 June 2007 02:17:32 pm Dave Rolsky wrote:
 The last round had one bug in it, in that it broke tests in
 t/live_component_controller_args.t that expected the path to include a
 doubled slash. I'm not sure this is a sane test (a doubled slash probably
 should not be relevant), but I don't want to get too sidetracked.

 Also, per jrockway's IRC request, I've separated the patches by distro.

Thanks.  All of these were applied as r6477.  Yay for svk push --lump :)

To those wanting to test, the patches are in branches ending 
with proxystuff, like branches/Catalyst-Runtime-proxystuff.  I've 
personally tested the new code with perlbal + dev server, and it's working 
wonderfully with this perlbal config:

  CREATE POOL myapp
POOL myapp ADD 127.0.0.1:3010
POOL myapp ADD 127.0.0.1:3011
POOL myapp ADD 127.0.0.1:3012
POOL myapp ADD 127.0.0.1:3013
  
  CREATE SERVICE balancer
SET listen  = 0.0.0.0:1234
SET role= reverse_proxy
SET pool= myapp
SET persist_client  = on
SET persist_backend = on
  ENABLE balancer
  HEADER balancer insert X-Forwarded-Host: foo.jrock.us
  HEADER balancer insert X-Forwarded-Port: 1234

And of course, it works fine without a proxy in front too :)

Thanks, Dave!

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

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


Re: [Catalyst] :Template() Attribute

2007-06-16 Thread Jonathan Rockway
On Friday 15 June 2007 08:36:33 am Christopher H. Laco wrote:

 OPTION #2: View::TT, View::Mason, View::**
 --

 PROS:

 Template() will be honored with the use of RenderView and the use of
 forwarding to a view manually (like in REST or other controller code).

 CONS:

 This has to be implemented in each View::** package that wants to
 support it.

 IF one changes from a view the support it, to one that doesn't,
 controllers go boom.


What we really need to do is add a utility method like template_name() to the 
Catalyst::View base class.  Even without the :Template attribute, there is 
code duplicated between every view that shouldn't be( $template = 
$c-action || $c-stash-{template} ). 

Let's factor that out into to Catalyst::View, fix the views in svn, and then 
you can add the :Template code there.  It needs to be done, and your feature 
is the, uh, catalyst for change.

Thoughts?

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

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


[Catalyst] fixed Catalyst::Component::ACCEPT_CONTEXT

2007-06-13 Thread Jonathan Rockway
Hi all,

I released Catalyst-Component-ACCEPT_CONTEXT-0.03 this morning.  It fixes a 
bug where the next ACCEPT_CONTEXT in the NEXT call chain wasn't passed the 
context, and it fixes the context destruction / memory cycle bug.  It might 
still be broken :), so any feedback would be appreciated.  

ACCEPT_CONTEXT is a simple concept, but the details are messy.  Hopefully I'll 
get this module right and spare you most of the details :)

Enjoy, and thanks for feedback so far.

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] dynamic web framework jam

2007-06-09 Thread Jonathan Rockway
On Friday 08 June 2007 08:54:02 pm Bob Faist wrote:
 Not sure if this is of interest to any Catalyst developers out there.

Gotta love conferences that require you to sign a liability release form. 

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


pgpby30H235zd.pgp
Description: PGP 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] Using other Modules

2007-06-02 Thread Jonathan Rockway
On Friday 01 June 2007 04:56:59 am Sven Eppler wrote:
 But dispatching the App this way, will create a situation that the app
 starts even if the module is not present on the deployment machine. But at
 the moment if somebody tries to add a new User, the application crashes
 complaining about not finding the module.

You must be doing something odd.  The application should not start if the 
module is not found.

Given:

package Angerwhale::Controller::Foo;
use strict;
use warnings;
use base 'Catalyst::Controller';

use Not::Here;

1;

in my app, I get:

$ perl script/angerwhale_server.pl
Can't locate Not/Here.pm in @INC (@INC 
contains: /home/jon/projects/angerwhale/script/../lib /etc/perl 
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl 
/usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 .) 
at /home/jon/projects/angerwhale/script/../lib/Angerwhale/Controller/Foo.pm 
line 8.
BEGIN failed--compilation aborted 
at /home/jon/projects/angerwhale/script/../lib/Angerwhale/Controller/Foo.pm 
line 8.
Compilation failed in require at (eval 209) line 3.
Compilation failed in require at script/angerwhale_server.pl line 57.

What are you doing differently?  Please show us your code.

Also, you might be interested in PAR deployment:

http://www.catalystframework.org/calendar/2006/4

Regards,
Jonthan Rockway

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


pgpjHCx0yJhIH.pgp
Description: PGP 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] JavaScript::Minifier new version

2007-05-26 Thread Jonathan Rockway
On Saturday 26 May 2007 05:01:21 pm Peter Michaux wrote:
 I forgot to do export instead of a fresh checkout. Ok. I'll get that next
 time.

To prepare a tarball of your CPAN module for CPAN release, try running make 
dist.  That will prevent inclusion of working-copy cruft (like Makefile, 
pm_to_blib, .svn, etc.).  You can also run make disttest to test your 
distribution, to make sure you didn't forget something in your MANIFEST or 
whatever.

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


pgpWSWiDvUTFz.pgp
Description: PGP 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] Re: Persistent login

2007-05-15 Thread Jonathan Rockway
On Tuesday 15 May 2007 06:19:02 pm Evaldas Imbrasas wrote:
  I do not know what you mean lasts longer then a session  -- http is
  stateless,  if you want state (such as logged in and authorized) you need
  some sort of session (cookie, uri, hiddenform,...).

 I am already using standard Catalyst plugins that handle sessions and
 authentication. I set sessions to expire after 1 hour of inactivity.
 What I'm looking for is the ability to auto-login users when they come
 back after, say, 1 week, when their previous session is long expired.

Use the session plugin and set the session expiration to ... 1 week.  If some 
data needs to expire sooner than that ... expire it sooner than that.

Here's what I would do.  Create a session and log the user in.  Store a last 
login time in the user_class.  If the last_login (or last_activity; 
whatever) is too long ago, delete data from the session and start over.

Another thing you could do is to set a cookie with the user's login name, and 
use that to pre-fill the username box on the login page, etc.

Am I missing something here?

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

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


Re: [Catalyst] AJAX with catalyst

2007-05-12 Thread Jonathan Rockway
On Saturday 12 May 2007 06:36:05 am Dmitri Pissarenko wrote:
 Hello!

 I'm learning catalyst and have written a simple application, which
 lets user display, edit, add data to/from database.

 Now I want to make it more user-friendly by using some elements known
 from desktop apps:

 1) Popup windows
 2) Context menus
 3) Panels, which I can drag from one place to another. That is, I have
 four panels (with different content) on a page, and I can change their
 places by dragging one panel to another place.

There are a variety of toolkits that will do this for you.  Dojo is the most 
advanced for desktop-style UIs.  There's also YUI, GWT, mootools, mochikit, 
jquery, and prototype.  Don't use prototype unless you like to debug lots of 
weird javascript problems.

Most of these toolkits want JSON back from your application, so you'll 
probably want to set up a REST interface with Catalyst::Action::REST and use 
that for the AJAX.  Usually rendering to JSON is faster (both in render time 
and transfer time) than rendering to HTML, so resist the urge to use AJAX 
kits where you send fully-rendered HTML to the AJAX library.  Just send the 
data and let the rendering happen on the client side.

Finally, Jemplate (along with Catalyst::View::Jemplate) is a great way to push 
the rendering of your Template Toolkit templates off to the client.

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


pgpuVRBRNn7zG.pgp
Description: PGP 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] Howto use ConfigLoader?

2007-05-12 Thread Jonathan Rockway
On Saturday 12 May 2007 11:09:26 am John Romkey wrote:
 You'll see that message even if there's an error in the config file.
 YAML is very sensitive about whitespace. Try running the file through
 ysh, the YAML shell, to check for errors.

This is a waste of time.  I recommend adding a test to your test suite that 
validates the YAML with Test::YAML::Valid:

   #!/usr/bin/env perl
   use strict;
   use warnings;
   use Test::More tests = 2;
   use Test::YAML::Valid;

   my $CONFIG = 'myapp.yml';

   ok(-e $CONFIG, $CONFIG exists);
   yaml_file_ok($CONFIG ,$CONFIG validates);

Now you never have to worry about invalid YAML again.  (You might /have/ it, 
but you won't have to /worry/ about it ;)

Regards,
Jonathan Rockway

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


pgpjWyYFWPZFh.pgp
Description: PGP 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] Shoot out -- Catalyst / RoR / Other MVC apps --

2007-05-10 Thread Jonathan Rockway
On Tuesday 08 May 2007 03:20:32 pm Matt S Trout 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.

I've written a chapter about this for the book.  That probably won't help you 
for a few months though :)

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


pgpIwbQFaktXu.pgp
Description: PGP 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] How to make MyApp::B a part of MyApp::A ?

2007-05-03 Thread Jonathan Rockway
On Wednesday 02 May 2007 05:30, Oleg Pronin wrote:
 Greetings!

 I want to make MyApp::B a part of MyApp::A under namespace for example
 /folder/

Pretty sure that you can't do this now, although it is a feature planned for 
the next release.  The app/context split branch in svn might have the code 
you need for this, but it may or may not be finished yet.

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


pgpdBgPZ3sHrC.pgp
Description: PGP 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/


[Catalyst] Catalyst videos from YAPC::Asia

2007-04-24 Thread Jonathan Rockway
Hi all,

I presented a Catalyst talk at YAPC::Asia a few weeks ago.  If you're familiar 
with the basics of Catalyst, it's probably too introductory, but if you're 
still trying to piece everything together you might find it enjoyable.  You 
can watch / download the video at Google Video:

 http://video.google.com/videoplay?docid=-5854960129518644625

Unfortunately, I typo'd a few slides, so please refer to the manual for the 
correct syntax.  (I wrote Cmy ($self, $c, @args); instead of Cmy ($self, 
$c, @args) = @_; ... Doh!)

I also did a 20 minute DBIx::Class talk which should help you get started with 
DBIx::Class:

 http://video.google.com/videoplay?docid=-559293395597215852

For completeness, there's also an Angerwhale talk:

 http://video.google.com/videoplay?docid=1741058916694988988

There are also a few DBIC talks in Japanese:

 http://video.google.com/videoplay?docid=7385892916151702741
 http://video.google.com/videoplay?docid=6272425301929799562

The full list of talks is here:

 http://video.google.com/videosearch?q=yapc+asia+2007

Thanks to miyagawa++ and the (YAPC::Asia team)++ for doing such a great job 
with the videos (and conference in general).

Regards,
Jonathan Rockway

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


pgpFR4nK3yV64.pgp
Description: PGP 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] Re: oe1.orf.at now running on Catalyst

2007-04-22 Thread Jonathan Rockway
On Friday 20 April 2007 09:44, J. Shirley wrote:
 We have some MojoMojo templates (thank jrockway), and now we just need
 time to work on it. 

Actually, jwang++ did most of that work.

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


pgpFu7MIatd6d.pgp
Description: PGP 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] Good Resources for cutting edge/best practices

2007-03-13 Thread Jonathan Rockway
On Tuesday 13 March 2007 18:27, Mesdaq, Ali wrote:
 Some of the areas I would specifically like to learn about are:
 - table-less pages
 - perl templating (already started a thread on that)
 - Website security
 - Ajax (basics, advanced, security)
 - Advanced javascript
 - Best practices (string validation, etc)
 - SEO techniques (urls, content placement, etc)
 - Must have tools (json, mochikit, etc)

I don't think any of these have to do with Perl.  Tables are tables regardless 
of how you print the table tag, for example :)

For validation, try FormBuilder.  For AJAX, try Jemplate (nice if you're using 
TT).  If you use TT, escape HTML before you print it: [% variable | html %].

That's about it -- the rest is handled for you elsewhere.  (SQL injection is 
avoided by using DBIx::Class or something similar.  Taint mode can prevent 
you from doing qx($untrusted_input).  etc.)

Regards,
Jonathan Rockway

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


pgpBVHFHkomOq.pgp
Description: PGP 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] Detecting if a user aborted a (long) download

2007-03-11 Thread Jonathan Rockway
On Sunday 11 March 2007 09:26, Thomas Klausner wrote:
 But how do I figure out if the download was successfull? I didn't find
 anything in the docs (but a RTFM-answer is appreciated, if I missed the
 right piece of codocumentation).

You probably want a subclass of IO::File that will callback into your 
application as the file is streamed.  Keep in mind that this won't account 
for buffering between the app and webserver, the webserver and the load 
balancer, the load balancer and the user's ISP's front-end proxy, the user's 
ISP's front-end proxy and the user's TCP stack, the user's TCP stack and the 
web browser, the web browser and disk cache, and finally the disk cache and 
the user's disk.  Not as simple as it seems, is it? :)

You'd be better off just letting the user download the file as many times as 
it takes for, say, a week.

Regards,
Jonathan Rockway

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


pgp9lU3t4ZQUV.pgp
Description: PGP 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] Detecting if a user aborted a (long) download

2007-03-11 Thread Jonathan Rockway
On Sunday 11 March 2007 20:59, Jeff Chimene wrote:
 How does that differ from something that compares bytes sent to bytes
 received? Assuming that the OP defines success when bytes received =
 bytes sent

How do you determine how many bytes were received and successfully written to 
disk?

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


pgpqrXAAAYk87.pgp
Description: PGP 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] Detecting if a user aborted a (long) download

2007-03-11 Thread Jonathan Rockway
On Sunday 11 March 2007 21:18, Jeff Chimene wrote:
 Jonathan Rockway wrote:
  On Sunday 11 March 2007 20:59, Jeff Chimene wrote:
  How does that differ from something that compares bytes sent to bytes
  received? Assuming that the OP defines success when bytes received =
  bytes sent
 
  How do you determine how many bytes were received and successfully
  written to disk?

 There's also this:
  http://ajaxpatterns.org/Progress_Indicator#What_sort_of_progress_indicato
 r_will_you_use.3F

I think this thread has wandered a bit off topic.  We are talking about how to 
ensure that a user has reliably downloaded and is able to access (from his 
own machine) an mp3 file.  The answer is that you can't do that without 
asking the user :)

There are various compromises that you can make instead, including checking to 
see if the whole file at least made it out of your catalyst app (by having 
your filehandle monitor that for you).  You can also give the user a good 
amount of time to download the file as many times as he likes (bandwidth is 
cheap), or you can have customer support allow the user to re-download if he 
complains (Apple does this).

You are free to ignore all of the above advice.  It isn't my problem.

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


pgpQXvHvEUV3i.pgp
Description: PGP 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] Performance

2007-03-09 Thread Jonathan Rockway
On Friday 09 March 2007 12:51, Dave Rolsky wrote:
 On Fri, 9 Mar 2007, Andy Grundman wrote:
  We've been discussing this a bit in #catalyst-dev.  I think Memoize would
  work, but it needs to be done carefully so it works with all our
  different varieties of calling uri_for, and also with multiple Catalyst
  apps running under the same mod_perl instance, for example.

 It might be safer and simpler to not use Memoize, and store the
 memoizations in the Catalyst object passed into the method. That'd avoid
 the multi-app problem. Another potential problem using Memoize is that you
 could have more or less unlimited memory bloat over time. By storing this
 in the object, you ensure that the cache is cleaned regularly.

Memoize on CPAN does LRU cache expiration.  If we do decide to cache, we can 
easily steal the relevant code :) 

Regards,
Jonathan Rockway

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


pgp2NkLTkcmPF.pgp
Description: PGP 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] Chained, slashes, and escaping

2007-03-05 Thread Jonathan Rockway
On Monday 05 March 2007 14:33, Jim Spath wrote:
 When I access the following URI:

 /tag/sl%2Fashes

 $tag gets set to sl instead of sl/ashes.

Apparently back in the early days of the web, a URL like that caused problems 
with poorly written CGI scripts that blindly opened the PATH_INFO variable.  
Instead of fixing the scripts, the apache / NCSA HTTPD authors decided to 
break the URL spec for the rest of forever.

http://mail-archives.apache.org/mod_mbox/httpd-dev/199612.mbox/[EMAIL PROTECTED]

11 years later, the web is still broken (for backwards compatibility, of 
course).

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

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


Re: [Catalyst] insecure deps with Module::Pluggable::Fast

2007-02-26 Thread Jonathan Rockway
Daniel McBrearty wrote:
 you're right, sorry, my bad ...
 
 It was 0.06 - I just updated to 0.13, and that's fixed. Now I have a
 similar error in my schema ... anyone know the cpan command to
 globally update my libraries ... !?

perl -MCPAN -e 'shell upgrade'

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

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


Re: [Catalyst] displaying csv content

2007-02-23 Thread Jonathan Rockway
Octavian Rasnita wrote:
 I think there should be a more elegant solution.

You should probably have a CSV view which sets the headers properly.
Forward to the CSV view for CSV, or the HTML view for HTML.

In one of my applications, I have YAML, JSON, HTML, and Atom as possible
output formats.  My controller code is the same for each of the formats;
the View is where I do the view-specific work.  (That's the idea behind
MVC, after all.)

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] Catalyst RPM

2007-02-23 Thread Jonathan Rockway
Patricio A. Bruna wrote:
 Anyones if is there any repo RPMS of Catalyst?

Yes, there are.

http://www.google.com/search?q=catalyst+perl+rpm

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

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


Re: [Catalyst] displaying csv content

2007-02-23 Thread Jonathan Rockway

Octavian Rasnita wrote:
 Content-Type: text/comma-separated-values

Is this correct?

RFC4180 says to use text/csv, although TSV is text/tab-separated-values.
 Confusing.

http://www.rfc-editor.org/rfc/rfc4180.txt

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] You have been automatically logged out.

2007-02-21 Thread Jonathan Rockway
Nilson Santos Figueiredo Junior wrote:
 On 2/21/07, Jonathan Rockway [EMAIL PROTECTED] wrote:
 The idea is to let the user know why their action failed, not to pop up
 messages saying something might fail in the future!  Plus it's easier
 to implement, and works with every browser.
 
 I've been a victim of web applications designed like this for several
 times. It all seems like a good idea until you spend a long time
 filling a form or writing a piece of text only to find out that you've
 been logged out and your last 10 minutes were suddenly trashed.
 
 If you're *only* using server-side checks be sure to never drop user
 submitted data when their session has timed out otherwise it might
 become a major PITA for your users.

That goes without saying :)  It's probably worth it for someone to write
an abstraction that automates this:

1) Session expired; save $c-req-params and the intended action
2) Require authentication
3) restore params, forward to the saved intended action.

Unfortunately I've only done this in my mini-PHP framework at $job.

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

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


Re: [Catalyst] todo list for FormBuilders (was the l10n thread)

2007-02-20 Thread Jonathan Rockway
Christopher H. Laco wrote:
 FormBuilder is nice when it comes to localizing the messages via
 messages.$lang. It totally sucks when it comes to localizing the form
 labels themselves. It looks like I either have to manually loop through
 teh fields and localize the labels, or use a different .frm config for
 each language...which means duplicating major parts of the config.

This doesn't really answer your question, but raises another good point.
 FormBuilder's definition files are great.  The fact that they're
magically parsed by the secret internals FormBuilder isn't.  In your
case, you really want something like this:

Form:
  foo:
name: _[1]
  bar:
name: _[2]
...

and then you want to apply a filter that properly maps _[1] to the
localized string as expected.

The way this should work is that form definition files should be
retrieved from a Model.  The default model would parse the YAML and then
pass the result to FormBuilder.  This would give you the opportunity to
reuse an existing model (maybe you want your forms to come from a
database), and give you the opportunity to subclass the model to do
l10n, use XML instead of YAML, etc.  The idea is to use a Catalyst model
instead of a FormBuilder model.  This would solve your problem, and
many others that people haven't had yet :)

Interestingly (now that I think about it) FormBuilder is really its own
MVC framework (its own filesystem model for reading config, its own
templating system as a view).  I guess what we need to do is get rid of
FormBuilder's model and view and use Catalyst's instead.  (Something I
dislike about FormBuilder is invoking TT twice per request; [% PROCESS
my_form.tt form=FormBuilder %] is much clener.)

Then you could read XML-formatted forms from memcached and render them
with ClearSilver -- without FormBuilder ever knowing or caring.  (The
flexibility of Catalyst we all love...)

Anyway, /me goes to look at how easy this is to do... but in the mean
time... comments?  Am I missing something?

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

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


Re: [Catalyst] Question on serving files

2007-02-16 Thread Jonathan Rockway


[EMAIL PROTECTED] wrote:
 How do I do this through the Catalyst handler  response mechanism?

Just like you'd serve any other data (see other posts in the thread
for the details).  Get the data, set the headers, shove it into
$c-res-body.  You might want to use some sort of sendfile
implementation, though, for performance reasons.  Using a 100M
catalyst process to serve spreadsheets is a waste of resources.  (My
suggestion is to set cache control headers and then let your webserver
serve future requests from its cache.  Easy to set up, and as fast as
static pages after the first request.)

As for getting the directory listings, you'll probably want
Catalyst::Model::File.  For guessing the types of the files (the
hardest part of this exercise), File::MMagic::XS looks like a good
direction to go in.

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] Question about Angerwhale Catalyst Application

2007-02-12 Thread Jonathan Rockway
Matt S Trout wrote:
 That's actually $app at new() time, not a request-level $c. Maybe if you
 renamed it it'd be less confusing?

I actually changed it to a real ACCEPT_CONTEXT recently -- the new Cache
interface seems to need a real $c instead of the $app.

For everyone else listening in, Angerwhale has improved greatly over the
weekend in terms of best practices.  No strange default actions
sitting around, no data coupled into the model, etc.  0.03 will be out soon.

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

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


Re: [Catalyst] looping

2007-02-12 Thread Jonathan Rockway
Will Smith writes:
 my $recordset = [$c-model('myDB::Books')-search( authorid =
 ${authorid} )];
 while(my $name = $recordset-next){
 $lname[$i] = $name-lname;
 $fname[$i] = $name-fname;
 $i = $i + 1;
 }


Wrong list, but here's a hint... arrays aren't iterators.  Get rid of
the []s.

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

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


Re: [Catalyst] Patch for C::Manual::Intro about :Private attribute being exclusive

2007-02-12 Thread Jonathan Rockway
Troy Davis wrote:
 Hi Everyone,

 Phaylon asked me to send this manual patch in, it adds a sentence to the
 effect that Catalyst's :Private attribute is exclusive and will not work
 with other attributes.

Thanks.  Applied as r6067.

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

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


Re: [Catalyst] Question about Angerwhale Catalyst Application

2007-02-09 Thread Jonathan Rockway
John Napiorkowski wrote:
 I was under the impression that it you needed the
 context in a component you needed to override
 ACCEPT_CONTEXT, since new is only called once when the
 application starts up.  Using ACCEPT_CONTEXT
 transforms your component to a type Class, since it
 creates a new object for each request instead of using
 the same one over and over.  But maybe I am not
 understanding it?


 Appreciate some thoughts, just trying to improve my
 best practices.

I only need $c so I can get at $c-cache and $c-model('UserStore') at
the beginning.  Also, that code was written before I knew about
ACCEPT_CONTEXT -- Angerwhale was my first foray into Catalyst.  Despite
that, it's proven extremely easy to maintain, extend, and refactor.

For now, consider Angerwhale a get 'er done thing, not a Catalyst
best-practices guide.  There's lots of awesome messy code in there.
(See all the default actions, for example.)

Fixes welcome -- mail me if you want a svn account.

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

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


Re: [Catalyst] Pagenav?

2007-02-09 Thread Jonathan Rockway
Bernhard Janetzki wrote:
 Hey Guys,
 i am wondering if there is a pagenavigation-View e.g. (Page 1|2|3...100) 
 available? 

If you're using DBIC, try $resultset-page($page_number) and
$resultset-pager.  The pager (Data::Page) object will give you all the
vital information like current page #, last page #, # of items on the
current page (and lots more).  The -page method will get page n of the
resultset for you.  The code would look something like this:

controller:

$page = $c-req-param('page') || 1;
$rs = $c-model('DBIC')-search-whatever;
$c-stash(results = [$rs-page($page)]);
$c-stash(pager = $rs-pager);

Template:

Page [% pager.current_page %] of [% pager.last_page %]
(results [% pager.first %] - [% pager.last %] of [% pager.total_entries %]

[% FOREACH row = results %]
[% PROCESS row ... %]
[% END %]

a href=[% c.req.uri_with({page = pager.next_page}) %]Next/a
etc.

Hope this helps.  You might want to use Data::Page::Navigation to help
with the 1 2 3 4 5 ... stuff.

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

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


Re: [Catalyst] save session data

2007-02-09 Thread Jonathan Rockway


Fernan Aguero wrote:
 Anyone went that path? Perhaps this wheel is already
 available from cpan? :)

Catalyst::Plugin::Session::PerUser?

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

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


Re: [Catalyst] save session data

2007-02-09 Thread Jonathan Rockway
Yuval Kogman wrote:
 Hi, my name is Yuval Kogman. You may know me from modules such as
 
 Crap, what a stupid misquote... you may *remember* me... sorry
 everyone.

If you're trying to sound like Troy McClure, it's Hi, my name is $name.
 You may remember me from such modules as `Foo' and `Bar'. :)

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

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


Re: [Catalyst] Catalyst::Plugin::ConfigLoader::Environment on windows

2007-02-09 Thread Jonathan Rockway
On Friday 09 February 2007 21:03, Greg McAlpin wrote:
 Hi.

   Trying to install Angerwhale and running into a problem with one of the
 tests for Catalyst::Plugin::ConfigLoader::Environment.  I hope that it's
 okay to post this to this list.  I would appreciate any help.

I suggest installing it under Cygwin -- you're going to have lots of trouble 
with the dependencies (Cache::FastMmap isn't going to work, probably) on 
plain Windows.  I know for a fact that Angerwhale works fine under Cygwin, 
though; I occasionally do development there.

 C:\xampp\perl\cpan\build\Catalyst-Plugin-ConfigLoader-Environment-0.01cat
 test01.txt BAR:  bar
 FOO_BAR_BAZ:  quux
 root: 
 C:\xampp\perl\cpan\build\Catalyst-Plugin-ConfigLoader-Environment-0.01\t\li
b\TestApp\root home: 
 C:\xampp\perl\cpan\build\Catalyst-Plugin-ConfigLoader-Environment-0.01\t\li
b\TestApp FOO:  foo
 VIEW::TESTVIEW_FOO:  Test View's foo!

Looks like Windows uppercases environment variables, which UNIX doesn't.  You 
can safely remove ConfigLoader::Environment from Angerwhale, though -- it's 
only used during the tests and if you're deploying on UNIX and using 
something like envdir for configuration.  

However, suggestions for making ConfigLoader::Environment work cleanly on both 
Windows and UNIX are welcome.

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


pgpK5jiSYJan5.pgp
Description: PGP 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/


[Catalyst] Catayst::View::MicroMason

2007-02-07 Thread Jonathan Rockway
Hi!

A few months ago, I fixed a bug and uploaded version 0.04_01 of 
Catalyst::View::MicroMason.  I haven't heard from anyone using the module, 
but I was hoping to before I uploaded a stable version.  So if you're using 
it, does it work?  If not, what's broken?

Thanks for letting me know.

Regards,
Jonathan Rockway

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


pgpupAqtCGagc.pgp
Description: PGP 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] no buffering

2007-02-05 Thread Jonathan Rockway
Octavian Rasnita wrote:
 Hi,

 I want to send a dynamicly generated csv file to the browser using a
 Catalyst app, but without storing the whole content in a variable before
 sending it.

http://lists.rawmode.org/pipermail/catalyst/2006-June/008316.html

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

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


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

2007-02-05 Thread Jonathan Rockway
On Monday 05 February 2007 15:22, Svilen Ivanov wrote:
 If the module enlisted there has unsatisfied dependencies, it doesn't
 install them automatically nor at least ask for confirmation. For
 example, C::P::Session module requires 2 CPAN modules:
 Object::Signature and Test::Deep which aren't installed and build

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

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

Regards,
Jonathan Rockway

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


pgp6hi90b1weE.pgp
Description: PGP 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] Catalyst promoters required

2007-02-04 Thread Jonathan Rockway
On Sunday 04 February 2007 18:53, Kieren Diment wrote:
 Here's a thread on reddit.  Can we have some more positive catalyst action
 please :)

 http://programming.reddit.com/info/12u8e/comments

Seems like it's doing well even without the Cata-list members (heh).  I added 
a link to the tutorial, though, so that people know where to go to get 
started.

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


pgpfAnUfIGwB9.pgp
Description: PGP 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] Hair-pulling over YAML config

2007-01-31 Thread Jonathan Rockway
Chisel Wright wrote:
 /me heads off to drop a cat with a buttered slice of toast tied to its
 back ...

I tried this this morning.  The cat won.

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

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


Re: [Catalyst] Hair-pulling over YAML config

2007-01-30 Thread Jonathan Rockway


Chisel Wright wrote:
 On Tue, Jan 30, 2007 at 09:58:00AM -, Carl Vincent wrote:
 That's exactly what we need - outputting warnings at on of the
 ConfigLoader levels loses the content of the error message. Could
 always add a Keep Quiet option...
 
 To be read from the unparsable/invalild config file? ;-)

If the config file was parsed OK there's no need to report errors.
Because there weren't any.

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

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


Re: [Catalyst] Hair-pulling over YAML config

2007-01-29 Thread Jonathan Rockway
Carl Vincent wrote:
 I've patched my Config::Any (attached below) so it throws a warning. Not
 sure if this would cause problems if it was included in the distributed
 module...

This is something I've been worried about for a while.  Config::Any
tries to load every config file with every backend, so printing
warnings is going to lead to a lot of spurious garbage.

Perhaps making ConfigLoader louder would help?  If no config is loaded
(but ConfigLoader is loaded), then perhaps we need to

  [warn] Config file found but failed to load.  Errors
  [warn] YAML_OMG_YOU_FORGOT_SOMETHING (Line 42, Column 32)
etc.
  [warn] XML::Parser error: no ?xml ? declaration
  [warn] JSON ...

As you can see it's kind of verbose that way.  What do other people think?


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

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


Re: [Catalyst] C::C::FormBuilder question

2007-01-29 Thread Jonathan Rockway
Marc Logghe wrote:

 Couldn't render component /moe/mol_3D_conv_form - error was Can't
 call method render on an undefined value ...

According to the docs, you need to call render on the package:

   % FormBuilder-render %

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

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


Re: [Catalyst] Hair-pulling over YAML config

2007-01-29 Thread Jonathan Rockway


Carl Franks wrote:

 How about a Test::YAML, in the same vein as Test::Pod, providing a
 all_yaml_files_ok() rountine which accepts a list of files or
 directories to check?

How's Test::YAML::Valid?

 The uploaded file
 
 Test-YAML-Valid-0.01.tar.gz
 
 has entered CPAN as
 
   file: $CPAN/authors/id/J/JR/JROCKWAY/Test-YAML-Valid-0.01.tar.gz
   size: 24085 bytes
md5: 149c0d49b41c52e302d4393448f866ef


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

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


Re: [Catalyst] Changing Model attributes in ACCEPT_CONTEXT

2007-01-25 Thread Jonathan Rockway
On Wednesday 24 January 2007 16:30, James R. Leu wrote:
 This seems to work, but it feels wrong.  Is there a better way
 to go about changing the Model attributes on the fly per user.

Looks fine to me.  The main thing is that reconnecting to the database is 
pretty inefficient, so it's intentionally hard to do.  

You might be better off rethinking your approach.  Perhaps wrapping the tables 
with stored procs to enforce access control would work?  Then you'd only have 
to connect once, and it would probably be easy to get DBIC to silently pass 
@USERNAME=$c-user on every query.  I'm sure how well relations would work in 
that case, though.

Regards,
Jonathan Rockway

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


pgpXZxNz2E8sT.pgp
Description: PGP 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] Templates in the database

2007-01-19 Thread Jonathan Rockway


Bill Moseley wrote:
 I currently have most templates (TT) on disk -- and many I'd consider
 to be an integral part of the application and are thus under revision
 control with the rest of the application.
 
 But, it would make managing the running application a bit easier if
 the templates were in the database.  But, I don't really want to give
 up revision control.

How about a post-commit hook that copies the templates into the database
when you commit them?  If you want to edit them from the web interface,
then you'll just need to tell your app to commit them before you store
them to the database.

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

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


Re: [Catalyst] Catalyst::Helper::Model::DBIC::Schema patchette?

2007-01-18 Thread Jonathan Rockway

Kieren Diment wrote:
 script/myapp_create.pl model CatalystModelName DBIC::Schema
 MySchemaClass [ create=dynamic | create=static ] [ connect_info arguments ]

I would recommend an example that uses some usual naming conventions:

create.pl model SomethingDB DBIC::Schema Schema::SomethingDB
create=static dbi:SQLite:database

In fact, I would recommend that:

create.pl model SomethingDB DBIC::Schema dbi:...

Does What They Mean, i.e. create a static schmea in
MyApp::Schema::SomethingDB::*.  That would save typing for the very
common case.

Finally, the helper should add two scripts as well:
myapp_somethingdb_createschema.pl (that will copy the schema from a
named object to a DBIC schema module), and myapp_somethingdb_deploy.pl,
which will push the schema to the database named in the
myapp.[cfg|yml|whatever] file.

I'm a bit swamped at the moment, but these should be super simple to
write.  Copy mojomojo_spawn as the _deploy script, and just do a
one-liner around SQL::Translator for the _createschema.pl script.

If someone would implement that, it would make DBIC::Schema even more
pleasant than it already is. ;)

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

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


Re: [Catalyst] Re: Catalyst vs Rails vs Django Cook off

2007-01-18 Thread Jonathan Rockway
A. Pagaltzis wrote:
 
 Eh? Apache doesn’t dispatch anything unless maybe you’re talking
 about mod_perl

If that's true, then GETting http://mysite.com/foo/bar/baz.html would
get a file named $DOCROOT/foo\/bar\/baz.html.  Considering that's never
the case (you can't have / in UNIX filenames, only paths), I would say
Apache is a dispatcher.  Add mod_alias and mod_rewrite into the mix, and
Apache is definitely a URL dispatcher.

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

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


Re: [Catalyst] Accessing YAML details from within the Model libraries

2007-01-18 Thread Jonathan Rockway
John Napiorkowski wrote:
 package myapp::Controller::test;
 
 [snip snip]
 
 sub myaction :Local {
 
  my ($self, $c) = @_;
 
  $c-log-info($self-{attr}); #onetwothree to log
 }

It would be better if you did:

   package MyApp::C::Test;
   use base 'Catalyst::Controller';
   __PACKAGE__-mk_accessors(qw/attr somethingelse whatever/);
   # ^^ important!

   sub an_action :Whatever {
  my ($self, $c, @args) = @_;
  my $attr = $self-attr; # get
  $self-somethingelse('something else'); # set
   }

You can set them via the config file as above:

   Controller::Test:
 attr: foo
 whatever: bar

See the Class::Accessor documentation for full details on how these
accessors work.

 
 I haven't tested this but I image it would work from
 Views and Models as well.  Give it a try.

It works.  Views, Models, and Controllers are all Components.
Theoretically you can have components that aren't M/V/C, but I've never
done that.

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

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


Re: [Catalyst] Recommend methods for form handling

2007-01-18 Thread Jonathan Rockway


Ian Docherty wrote:
 Jim Spath wrote:
 Thanks for all the responses guys, they have been very helpful!

 What about multi-lingual support?  It seems like FormBuilder is my
 best choice if I want to add multi-lingual support down the road.

 - Jim
 What has FormBuilder got to do with multi-lingual support? I use
 Catalyst::Plugin::I18N::DBIC (shameless plug)
 
 I don't use FormBuilder, I 'roll my own' html which gives me more control.

Well, if you like how FormBuilder does the layout, you might as well let
it do the i18n.  For the rest of the site, though, you'll need something
else, I would imagine.

FormBuilder is rather non-Catalyst-y in the sense that it's a little
bloated.  Removing FormBuilder's built-in templating, i18n, etc. and
integrating them with Catalyst's facilities for these things would be a
nice project.  In the mean time, FormBuilder's default are quite
convenient for most people, especially if you use TTSite.  I like it,
anyway.

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

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


Re: [Catalyst] creating binaries

2007-01-17 Thread Jonathan Rockway
[EMAIL PROTECTED] wrote:
   Octavian,  do what you want.  No one is stopping you.  You were
 asking for advice about this and you have been given it.

This is the most insightful comment so far.

Octavian, you got advice on why source encryption isn't a great idea.
If you want to do it anyway, then we told you how -- with PAR or with
perlapp.  We also suggested that you host the code yourself if you're
worried about leaking it.  Lastly, we suggested that you could always
open-source the application; rendering theft impossible!

Many experienced people have weighed in on the topic, and it's clear
that source encryption doesn't work for them.  They're using one of the
other two alternatives, and they're mostly experiencing success.

Learn from them; that's why you asked the list, right?  Sometimes the
idea that's stuck in your (anyone's) head is not the best.

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] creating binaries

2007-01-16 Thread Jonathan Rockway

 nmake catalyst_par
 ...
 Writing PAR tranzactiibursiere.par
 NMAKE : fatal error U1077: 'D:\WINDOWS\system32\cmd.exe' : return code
 '0x2'
 Stop.

What versions of:

App::Packer
PAR::Packer
PAR

do you have?

 But anyway, does this method hide the source code of the application?

Try these:

http://search.cpan.org/~shay/Filter-Crypto-1.18/lib/PAR/Filter/Crypto.pm
http://search.cpan.org/~smueller/PAR-Packer-0.970/lib/PAR/Filter/Obfuscate.pm

Keep in mind that the code has to be executed at some point, so anyone
with half a brain can get the code even if it's encrypted.  The same
holds for C, Java, .NET, PHP, etc.

A contract that reads expect a lawsuit if you modify the source should
be much more effective.

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

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


Re: [Catalyst] creating binaries

2007-01-16 Thread Jonathan Rockway
[EMAIL PROTECTED] wrote:
 
 I prefer you send me the one packaged with par:crypto -- I like to be able
 to read comments and see the original var names when I edit your hidden
 code. =)

DMCA violation.

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

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


Re: [Catalyst] Catalyst::Manual::Tutorial::CatalystBasics Issues

2007-01-15 Thread Jonathan Rockway
On Monday 15 January 2007 18:45, Jim Spath wrote:
 I am running:
 Ubuntu 6.06.1 LTS  
 Perl 5.8.7 # old
 Catalyst 5.61  # old
 DBIx::Class 0.07005
 Template 2.14# old

 I'm guessing that the tutorial is assuming a more recent version of
 Catalyst?  The version I am using happens to be the most recent
 available from the Ubuntu package repository.

Yup, that's your problem.  You might want to use CPANPLUS::Dist::Deb to 
generate newer Catalyst packages.

Working with outdated software is a pain, and is probably not worth it.  If 
you need the ability to deploy a Catalyst application to a stock 6.06 LTS 
server, use PAR to bundle the newer Catalyst with your app:

http://www.catalystframework.org/calendar/2006/4

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] mod_fastcgi vs mod_fcgid

2007-01-12 Thread Jonathan Rockway
Jonathan Rockway wrote:
 Michele Beltrame wrote:
 Hello all!

 These days I'm evaluating mod_fcgid, and the option to use it instead of
 mod_fastcgi as it seems less broken (better process management, etc...).
  Has any Catalyst user had experience with it? Opinions?
 
 I think most of us have experienced the opposite.

Hey, I have great reading comprehension skills!  Forget what I said.

mod_fastcgi is crufty and slightly broken, while mod_fcgid seems to be
more sane.

Sorry for the confusion.  I haven't had any coffee yet!

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

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


Re: [Catalyst] serving static files

2007-01-11 Thread Jonathan Rockway
Octavian Rasnita wrote:
 I have read about an example of setting a proxy/reverse proxy server for
 a Java application at the following link:
 
 http://www.daveyp.com/blog/index.php/archives/76/
 
 But the article says that the Apache server that is the proxy is also
 using mod_perl (for applying some filters), and also says that it can
 serve static files directly
 Is the article bad, or how can a mod_perl enabled Apache2 server can
 serve static files directly?

There are many possibilities here.  The hit isn't as big if you use
mpm_worker or mpm_event (instead of mpm_prefork).  The hit isn't as big
if you're only using mod_perl for (say) authentication or URL mapping.
The best thing you can do is understand WHY people are saying what they
are, so you can make your own decisions.

Catalyst apps tend to contain a lot of code; and that's why we recommend
a two-tiered setup.  If your application is an internal app with 10 hits
a day, don't waste your time tweaking Apache -- it doesn't matter.  If
your app is Vox, though, it's worth your time to set things up right.
In that case, a well-tuned server can save you thousands of dollars.

Finally, if you want general mod_perl advice, check the mod_perl list
archives:

http://perl.apache.org/maillist/index.html

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

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


Re: [Catalyst] serving static files

2007-01-10 Thread Jonathan Rockway
Octavian Rasnita wrote:
 What I don't understand is why serving the files directly decreases the
 performance of mod_perl apps, even though downloading those files has no
 relation with those mod_perl apps.

 Do you have a recommendation for a text for learning how to use a
 reverse proxy?

This has been discussed and documented to death.  Read
http://perl.apache.org/docs/1.0/guide/strategy.html for answers to your
questions.

 Does it happen the same in case of FastCGI applications?

myapp_fastcgi.pl is the backend server in this case.

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

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


[Catalyst] [Fwd: [Chicago-talk] Chicago.pm Meeting - 16th January 2007 - Catalyst, The Elegant MVC Web Framework]

2007-01-08 Thread Jonathan Rockway
Hey guys.  If you happen to be in Chicago and not on the chicago-talk
mailing list, you might be interested in this.  I'm giving a Catalyst
talk that will be screencast style (except you get to ask questions).
If you can make it, I'd love to see you there.

Regards,
Jonathan Rockway

 Original Message 
Subject: [Chicago-talk] Chicago.pm Meeting - 16th January 2007 -
Catalyst,   The Elegant MVC Web Framework
Date: Sun, 7 Jan 2007 12:13:32 -0600
From: Joshua McAdams [EMAIL PROTECTED]
Reply-To: Chicago.pm chatter [EMAIL PROTECTED]
To: Chicago.pm chatter [EMAIL PROTECTED], [EMAIL PROTECTED]

Join Chicago.pm on January 16th for an evening of Catalyst, a modern
framework for making web applications without the pain usually
associated with web development.  Jonathan will be talking in-depth
about developing Catalyst applications, a topic that he knows very
well.  He is a contributor to Catalyst, maintains numerous Catalyst
plug-ins, and is rumored to be writing a book on the subject.

Date: Tuesday January 16th 2007
Time: 7:00 p.m.
Where: Performics @ 180 N La Salle 12th Floor
RSVP: By noon January 15th to [EMAIL PROTECTED]

The official meeting starts at 7, but there is talk of a group getting
together before (or after) for a social.  You guys can nail down the
details on that :)

Also, don't forget the Chicago.pm meeting to be held this Tuesday
January 9th at IIT in Wheaton.  Andy Lester, Pete Krawzcyk, and myself
each have each picked four modules to present in a session called New
Modules For The New Year.  Check out http://chicago.pm.org/ for more
information.

See you there,
Josh

* BTW, I still have a few Perl Mongers t-shirts to distribute to
people.  I'll be bringing them to each of these meetings, so try to be
there if you are still without your shirts!
___
Chicago-talk mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/chicago-talk

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

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


Re: [Catalyst] How about the catalyst scalability

2007-01-08 Thread Jonathan Rockway
Matt S Trout wrote:
 
 On 5 Jan 2007, at 10:08, Mao DengFeng-e13751 wrote:
 
 Hi, all

 We try to develop a large web application like www.etoys.com.
 Catalyst can sustain that or not? I can't find the real large 
 application using catalyst. Who can provide a sample to me?
 
 http://dev.catalyst.perl.org/wiki/LiveApplications
 
 also: http://vox.com/ :)

/me votes for marcus to open source iusethis so that everyone can see
a real application that has actual users.  Or, maybe Vox wants to go
open source (like Livejournal).  Either way, the community would welcome
the contribution! :)

Regards,
Jonathan Rockway

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

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


Re: [Catalyst] Generating iCalendar

2007-01-08 Thread Jonathan Rockway
 gpg: WARNING: unsafe ownership on configuration file 
 `/home/moseley/.gnupg/gpg.conf'
 gpg: Signature made Sun 03 Dec 2006 03:27:14 PM PST using DSA key ID 10F54327
 gpg: external program calls are disabled due to unsafe options file 
 permissions
 gpg: keyserver communications error: general error
 gpg: Can't check signature: public key not found
 == BAD/TAMPERED signature detected! ==

The alternative is installing modules that the CPAN mirror has tampered
with.  Although in this case, gpg is just confused.  Do you run CPAN as
root (you don't need to anymore)?

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

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


Re: [Catalyst] Dojo Offline Kit

2007-01-06 Thread Jonathan Rockway
On Saturday 06 January 2007 05:34, Zbigniew Lukasiak wrote:
 This might be an inspiration to some of us:
 http://www.sitepen.com/blog/2007/01/02/the-dojo-offline-toolkit/

Sounds like he just reinvented XUL.  Poorly.

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

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


Re: [Catalyst] Managing CPAN on Ubuntu [was: 'Installing under ...' on the wiki]

2007-01-05 Thread Jonathan Rockway
On Friday 05 January 2007 05:08, Richard Jolly wrote:
 Reviving an old thread here - I was wondering if you found such a
 Dummies list.

 I'm new to the debian/ubuntu way (I've been on FreeBSD, an OS X). I
 gather there is a danger of mixing apt-get and CPAN installs. But from
 my impression people usually end up with mixed installs anyway.
 dh-make-perl is an option, but doesn't handle dependencies as well as
 cpan.

 I'm looking for strategies to handle this - particularly in the context
 of installing catalyst on ubuntu.

I like using CPANPLUS and CPANPLUS::Dist::Deb.  If you use this module, 
cpanplus will build a debian package (and dependencies) and then use dpkg to 
install the module.  That means that you can easily remove and upgrade 
packages with dpkg (and apt), or just use CPAN.  It's kind of a pain if 
you've already installed some modules, though, so it's best if you start 
using it right away.  (The problem, though, is that you have to install 
CPANPLUS somehow.)

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

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


Re: [Catalyst] iterating twice over the same resultset in the template?

2007-01-03 Thread Jonathan Rockway
 [% WHILE ( it = rs1.next() ) -%] ...
 [% WHILE ( it = rs2.next() ) -%] ...

 Is there any other way to do this? Is it possible to clone a
 resultset?


Why not just prefetch everything?

Controller:

my @elements : Stashed = $c-model(MyDB::table)-...-all;

Template:

[% FOREACH element = elements %]
...
[% END %]



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

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


Re: [Catalyst] IMPORTANT: Catalyst::Plugin::FormBuilder obsoleted by ::Controller::FormBuilder

2007-01-02 Thread Jonathan Rockway
Matt S Trout wrote:
 Call me a little confused, I am not sure that I properly grasp which one
 to use for FormBuilder.  For the moment, I am simply going to focus on
 the plugin (C::P::FB).
 
 Don't. The plugin's obsolete, undeveloped and has known interoperability
 issues.

Incidentally, I wrote the chapter of my book on FormBuilder the day
before the Controller was released :)  However, updating the chapter
only took about 30 seconds... so no excuses!

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

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


  1   2   3   >