Re: [Catalyst] "Unknown column 'me.role'" error

2007-09-07 Thread Jason Kohles
: map_user_role user_role_user_field: user_id -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/lis

Re: [Catalyst] SMTP vs sendmail

2007-08-31 Thread Jason Kohles
hardware failure? In both of these cases, if you were piping to sendmail and letting the local MTA handle the relay to the smarthost, then the mail would simply be queued until the mail server was available again. -- Jason Kohles [EMAIL PROTECTED] http://w

Re: [Catalyst] About output in a browser

2007-08-29 Thread Jason Kohles
deciding that since you didn't specify a content-type, it's going to default to text/plain. -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.rawmod

Re: [Catalyst] access stash outside methods

2007-08-22 Thread Jason Kohles
while ( my ( $url, $desc ) = each %{ $class->url_descriptions } ) { $descriptions{ $url } = $desc; } } return \%descriptions; } -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire __

[Catalyst] RFC: Multiple :Chained and/or :PathPart attributes?

2007-08-20 Thread Jason Kohles
my ( $self, $c, $date ) = @_; # load the appropriate revision into the stash } sub view : Chained('page','revision','date') PathPart('','view') Args (0) { my ( $self, $c ) = @_; if ( $c->stash->{ 'matches&#

Re: [Catalyst] Rate limiting password attacks

2007-08-17 Thread Jason Kohles
ive denial of service potential when people start intentionally sending bad passwords for people they don't like. -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List

Re: [Catalyst] t directory hierarchy

2007-08-15 Thread Jason Kohles
do $ make test It does not recurse into the sub-directories and only runs test scripts in the 't' directory. That's the default behaviour. To add subdirs, put tests('t/*.t t/*/*.t'); in your Makefile.PL Or, if you have a recent version of Module::Install, just use:

Re: [Catalyst] Test server as a child process

2007-07-31 Thread Jason Kohles
es the subprocess believe it is connected to a terminal will have the same effect... use IPC::Run qw( run ); run( "script/myapp_server.pl", 'pty>', $out_and_err ); -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing."

Re: [Catalyst] Running MyAppB under MyAppA (only for developers)

2007-07-31 Thread Jason Kohles
ing chained dispatch methods... 1; Then in the project that needs an admin interface... package MyApp::Controller::Admin; use strict; use warnings; use base qw( Admin::Base ); sub base : Chained('/') PathPart('admin') Args(0) {} 1; -

Re: [catalyst] conditional loading of Controllers and Models

2007-07-17 Thread Jason Kohles
in debug mode, seems simple enough to change the condition that disables it. Just put this in the controller class... sub register_actions { my ( $self, $c ) = @_; if ( ! $c->debug ) { return } return $self->SUPER::register_actions( $c ); } -- Jason Kohles [EM

Re: [Catalyst] html::prototype syntax in new Cat version

2007-07-10 Thread Jason Kohles
t/CGI-Ajax-0.701/ -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchabl

Re: [Catalyst] Anyone using ProxyPass?

2007-07-03 Thread Jason Kohles
rg/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/ -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire __

Re: [Catalyst] Template rendering error under mod_perl

2007-06-29 Thread Jason Kohles
our Makefile.PL/Build.PL or by figuring out where the libraries are installed, but that may not be the correct location for your root directory. Take a look at Catalyst::Utils for the home method to see how it figures it out... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/

Re: [Catalyst] Custom error

2007-06-27 Thread Jason Kohles
On Jun 26, 2007, at 12:45 PM, Brian Kirkbride wrote: Jason Kohles wrote: On Jun 25, 2007, at 1:27 PM, Evaldas Imbrasas wrote: Yes, that's what I meant, thanks Brian. Please provide a code example using RenderView action. I think it would also make sense to incorporate that example int

Re: [Catalyst] Custom error

2007-06-26 Thread Jason Kohles
Evaldas Imbrasas http://www.imbrasas.com ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/ catalyst@lists.rawmode.org/

Re: [Catalyst] test server with -host

2007-06-18 Thread Jason Kohles
(I can see other webservers on this machine). It does bind everything by default, if you can't access it from another host I'd start by looking at things like hostbased-firewalls on your development machine... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witt

Re: [Catalyst] Template creates objects via belongs_to autovivification

2007-06-13 Thread Jason Kohles
where Author has_many Books) __PACKAGE__->belongs_to(author => 'My::DBIC::Schema::Author', 'author', {join_type => 'left'}); -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves not

Re: [Catalyst] syntax

2007-04-16 Thread Jason Kohles
. Just a simple search: select * from books where id > '3'; $c->stash->{book} = [$c->model('myAppDB::Book')->search( ... ?? $c->model( 'myAppDB::Book' )->search( id => { '>' => 3 } ); -- Jason Kohles [EMAIL PROTECTED] htt

Re: [Catalyst] HOWTO reference config settings from template

2007-04-12 Thread Jason Kohles
y are all that are provided to TT by default... package MyApp::View::TT; sub template_vars { my ( $self, $c ) = @_; my %vars = $self->SUPER::template_vars( $c ); $vars{ 'ttconfig' } = $self->config; return %vars; } -- Jason Kohles [EMAIL PROTECT

Re: [Catalyst] Custom finalize_error

2007-04-03 Thread Jason Kohles
On Apr 2, 2007, at 5:39 PM, Jim Spath wrote: Jim Spath wrote: Jason Kohles wrote: On Apr 2, 2007, at 4:13 PM, Jim Spath wrote: I wanted to get rid of the "Please come back later" error page, so I defined my own finalize_error() in MyApp.pm as mentioned in this post: http:

Re: [Catalyst] Custom finalize_error

2007-04-02 Thread Jason Kohles
st and it is, so I'm unsure where to go from here. finalize_error is called long after the view processing has already been done, if you want to use a template to put a page there, you have to build your own Template object and process the template yourself. -- Jason Kohles [EMAIL PROTE

Re: [Catalyst] Sending email

2007-04-02 Thread Jason Kohles
th it... my $body = $c->view( 'TT' )->render( $c, 'email/registered' ); if ( ref $body && $body->isa( 'Template::Exception' ) ) { die "Rendering template failed! ($body)"; } $c->email( header => [ To =

Re: [Catalyst] Where and how to access database

2007-03-21 Thread Jason Kohles
at I've used this for that DBIx::Class can't do (or at least I couldn't figure out how at the time I needed to do it)... $c->model( 'MyModel' )->schema->storage->dbh->do( "NOTIFY update_listener" ); -- Jason Kohles [EM

Re: [Catalyst] YAML config embedded path_to mysql_read_default_file

2007-03-19 Thread Jason Kohles
7;t sure then you probably are, it's the default), then you can do this... Model::DBIC: schema_class: MyApp::Schema::DBIC connect_info: - dbi:mysql:opendevil;mysql_read_default_file=__path_to (configfile.cfg)__ -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A wi

Re: [Catalyst] Catalyst::Manual::Tutorial::CatalystBasics [error]Couldn't render template "undef error - status_msg is undefined

2007-03-17 Thread Jason Kohles
27;undef' would cause fewer problems. # This might be a good option for a debugging example... DEBUG => 'dirs', DEBUG_FORMAT => '', -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire _

Re: [Catalyst] Catalyst::Manual::Tutorial::CatalystBasics [error] Couldn't render template "undef error - status_msg is undefined

2007-03-14 Thread Jason Kohles
@dont_leave_blank ) { if ( ! defined $vars{ $x } ) { $vars{ $x } = q{} } } return %vars; } -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.raw

Re: [Catalyst] Anybody using Chained('.') ?

2007-03-13 Thread Jason Kohles
On Mar 13, 2007, at 10:41 AM, Robert 'phaylon' Sedlacek wrote: Jason Kohles wrote: I'm trying to use Chained('.') to create a controller base class that binds to the namespace of whatever controller class inherits it, but despite the documentation specifically menti

[Catalyst] Anybody using Chained('.') ?

2007-03-13 Thread Jason Kohles
- +--. | Path Spec | Private | +- +--+ '- +--' And I don't seem to be able to get any chained actions working unless they are chained to

Re: [Catalyst] Performance

2007-03-12 Thread Jason Kohles
> '{bar}' } ), since URI will escape the { and }, and your template will end up saying %7Bbar%7D instead of {bar}. -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___

Re: [Catalyst] Catalyst::Plugin::DateTime

2007-03-12 Thread Jason Kohles
else { # otherwise use now return DateTime->now(time_zone => $tz); } } # alias $c->dt *dt = \&datetime; -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire

Re: [Catalyst] html mail (was: reserved words)

2007-03-08 Thread Jason Kohles
want it, the rest of the world must change? -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/cat

Re: [Catalyst] reserved words

2007-03-07 Thread Jason Kohles
ement a process() method. It probably doesn't have anything to do with the name of the module... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.

Re: [Catalyst] Accessing $c from Model

2007-03-06 Thread Jason Kohles
Bad Things are likely to happen if you ever attempt to run your application under the debugger when you have a package named 'DB'. I'd recommend using a different name... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "

Re: [Catalyst] Role problem

2007-02-26 Thread Jason Kohles
>{dbic}->{user_role_user_field} = 'memeber_id'; package App::JumboRewards::Schema::MemberRole; __PACKAGE__->add_columns( qw/member_role_id member_role_created member_id role_id/ ); __PACKAGE__->config( authorization => { dbic => { user_role_u

Re: [Catalyst] Date::Calc and Date::Calendar with Catalyst?

2007-02-25 Thread Jason Kohles
a plugin. It pollutes the namespace with not one, but two useless methods (that do the exact same thing, no less) and gains nothing from being a plugin, it could very easily have been a module (in fact, take a look at the source, it does almost nothing anyway). -- Jason Ko

Re: [Catalyst] Foreign keys and DBIC

2007-02-23 Thread Jason Kohles
o (like CDBI::Loader::Relationship? eg "a brewery produces beers"), but how so with DBIC? See DBIx::Class::Schema::Loader -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire __

Re: [Catalyst] unicode best practices

2007-02-16 Thread Jason Kohles
advent calendar sources from subversion, and in the .pod it's literally C, so it appears it is supposed to be like that, and I don't get the point either... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire __

Re: [Catalyst] Re: looping

2007-02-14 Thread Jason Kohles
else is kind of pointless anyway... my @name = $c->model( 'myDB::Author' )->get_column( 'last_name' )->all; -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire _

Re: [Catalyst] Using C::P::A::ACL and C::M::FormBuilder together?

2007-02-13 Thread Jason Kohles
ivate. You've misunderstood what it means when it says it 'only works with Private', it means that if you have a sub like this: sub foo : Path('bar') { } Then the ACL can only be addressed by the name 'foo', not 'bar'. There is no reason to sp

[Catalyst] Chained action confusion...

2007-02-10 Thread Jason Kohles
- +---. | Action | Time | + +---+ | /index | 0.33s | | /end | 0.000

[Catalyst] Chained action confusion...

2007-02-10 Thread Jason Kohles
- +---. | Action | Time | +-------- +---+ | /index | 0.33s | | /end

Re: [Catalyst] MyAction for locally namespaced ActionClasses?

2007-02-08 Thread Jason Kohles
MyAction', and only found it in Catalyst-Manual. I didn't have time to look into it any deeper than that though... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: C

Re: [Catalyst] Bread crumb

2007-02-08 Thread Jason Kohles
On Feb 7, 2007, at 11:30 AM, Peter Karman wrote: Jason Kohles scribbled on 2/6/07 8:33 AM: It still feels a little kludgy, but this is how I'm doing it currently... [...] fwiw, that is pretty close to how http://search.cpan.org/~tigris/Catalyst-Plugin-Breadcrumbs-5/lib/ Catalyst/P

Re: [Catalyst] Bread crumb

2007-02-06 Thread Jason Kohles
fig->{ 'breadcrumbs' }->{ $path } ) { return $x; } $label = join( ' ', map { ucfirst } split( /[_-]/, $label ) ); return $label; } 1; [% FOREACH item IN site.breadcrumbs %] [% IF loop.last %] [% title or template.title or i

Re: [Catalyst] Reaction Development?

2007-02-06 Thread Jason Kohles
this bug off and on for the last three or four days, it's been driving me crazy... -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: Catalyst@lists.rawmode.org Listinf

Re: [Catalyst] getting the role id

2007-02-04 Thread Jason Kohles
en you can get the roles objects with $c->user->roles, and the User::Role objects with $c->user->map_user_role. -- Jason Kohles [EMAIL PROTECTED] http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire ___ List: C

Re: [Catalyst] Can we use both TT and TTsite at the same time

2006-11-12 Thread Jason Kohles
On Nov 8, 2006, at 10:10 AM, Bill Moseley wrote: On Wed, Nov 08, 2006 at 08:18:49AM -0500, Jason Kohles wrote: site/wrapper: [% IF template.name.match('\.(css|js|txt)') OR nowrap OR template.nowrap; debug("Passing page through as text: $template.name");

Re: [Catalyst] Can we use both TT and TTsite at the same time

2006-11-08 Thread Jason Kohles
emplates by using $c->{ 'stash' }->{ 'nowrap' } = 1 in your controller method, or by putting [% META nowrap = 1 %] in the template itself. -- Jason Kohles[EMAIL PROTECTED]http://www.jasonkohles.com/"A witty saying proves nothing."  -- Voltaire _

Re: [Catalyst] problem with FormBuilder + TT2

2006-09-19 Thread Jason Kohles
o do with the Path::Class::File object that path_to is going to return,use $c->path_to(qw/root customer signup.tt2/)->stringify instead.--  Jason Kohles[EMAIL PROTECTED]http://www.jasonkohles.com/"A witty saying proves nothing."  -- Voltaire

Re: [Catalyst] Post deployment application management

2006-09-14 Thread Jason Kohles
cho " *** Staging Update ***" cd /var/staging svn update -r$REV echo '--' echo " *** Test Results ***" perl Makefile.PL make test echo '--' echo

Re: [Catalyst] Catalyst::View::TT - strange caching annoyance

2006-09-13 Thread Jason Kohles
-memory caching by default. >From 'perldoc Template': Caching and Compiling Options CACHE_SIZE Maximum number of compiled templates to cache in memory (default: undef - cache all) -- Jason Kohles [EMAIL PROTECTED] - http://www.jasonkoh

Re: [Catalyst] HTML::Widget, callback constraint, and multiple records per form

2006-09-01 Thread Jason Kohles
(sub { my ( $value ) = @_; return see_if_exists( $value, $c ); }); } $w->element('Submit', 'Submit')->value('Submit'); $w->element('Reset'); return $w; } -- Jason Kohles [EMAIL PROTECTED] - http://www

Re: [Catalyst] HTML::Widget, callback constraint, and multiple records per form

2006-09-01 Thread Jason Kohles
back, what is happening is that the function is being run at the time you create the widget, and is running 10 times because it's inside a loop. What is actually getting set as the callback is whatever &see_if_exists returns. And because you are calling the function with the &,

Re: [Catalyst] Anyone actually using FastCGI with Apache (or even lighttpd)?

2006-08-30 Thread Jason Kohles
On 8/30/06, Matt S Trout <[EMAIL PROTECTED]> wrote: On 30/08/06, Jason Kohles <[EMAIL PROTECTED]> wrote: > On 8/29/06, Matt S Trout <[EMAIL PROTECTED]> wrote: > > > If somebody could write this up for Engine::FastCGI in the form of a > > patch I'm sure

Re: [Catalyst] Anyone actually using FastCGI with Apache (or even lighttpd)?

2006-08-29 Thread Jason Kohles
dn't break there, so in the end I decided I was probably better off spending that time trying to track down the FastCGI bug itself, which would seem to be a bigger win given the number of things besides Catalyst that I found that were affected by it... -- Jason Kohles [E

Re: [Catalyst] Anyone actually using FastCGI with Apache (or even lighttpd)?

2006-08-28 Thread Jason Kohles
$env->{ 'SCRIPT_FILENAME' } =~ s/$name$//; $env->{ 'PATH_INFO' } = $name.$env->{ 'PATH_INFO' }; $env->{ 'PATH_TRANSLATED' } = $env->{ 'SCRIPT_FILENAME' }.$env->{ 'PATH_INFO' }; $env->{ 'SCRIPT_NAME&#

[Catalyst] Anyone actually using FastCGI with Apache (or even lighttpd)?

2006-08-28 Thread Jason Kohles
oyment purposes, which is a lot trickier with mod_perl, although if I can't get this working, I may have to bite the bullet and see about doing something ugly with mod_perl to make it happen. -- Jason Kohles [EMAIL PROTECTED] - http://www.jasonkohles.com/ "A witty saying proves nothing.&

Re: [Catalyst] Bypass TT wrapper

2006-08-22 Thread Jason Kohles
emplate.nowrap;This way you can disable the wrapping either in the template, by putting [% META nowrap = 1 %], or in the controller, using $c->stash->{ 'nowrap' } = 1. -- Jason Kohles[EMAIL PROTECTED] - http://www.jasonkohles.com/"A witty saying proves nothing."  -- Volta