i use another easy way:
package C::V::TT;
use strict;
use base 'Catalyst::View::TT';
__PACKAGE__-config(
{
CATALYST_VAR = 'catalyst',
...
FILTERS = {
'dollar' = sub { sprintf('%.2f',$_[0]); },
}
},
);
so you can use it in the Template like this:
quote who=Tatsuhiko Miyagawa
As discussed on IRC, this seems to be a bug introduced around Catalyst
5.708.
I got a commit bit from Jay (thanks!) and committed the fix with test
suite.
http://dev.catalystframework.org/svnweb/Catalyst/revision/?rev=6873
Yeah, thanks. For others, the bug was
Hi
My existing Catalyst application is being extended. I want to keep a
record of previous passwords used by a user to prevent them being re-used.
I have Model 'UsedPassword' to keep track of the previous 8 (say)
passwords as so-
package MyApp::Schema::UsedPassword;
use strict;
use base
I have found a thread on DBIx-class mailing list that throws some light
on this using
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/Schema.pm#load_namespaces
This seems to solve the problem for putting such logic into the
Model/Schema but would it be better to put this type of
On 13/09/2007, Ian Docherty [EMAIL PROTECTED] wrote:
I have found a thread on DBIx-class mailing list that throws some light
on this using
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/Schema.pm#load_namespaces
This seems to solve the problem for putting such logic into the
Will Hawes wrote:
...
Isn't this just a case of adding a create_limited() method to your
model class?
package MyApp::Schema::UsedPassword;
...
sub create_limited {
my( $self, $user, $password ) = @_;
# password checking logic here
}
In your controller:
My application has (effectively, subject to some cut and paste) the
following.
package MyApp::Schema;
use strict;
use warning;
use base qw(DBIx::Class::Schema);
__PACKAGE__-load_classes(qw(
UsedPassword
));
1;
package MyApp::Schema::UsedPassword;
use
Hi,
Is it possible to log a certain SQL which is generated in a Catalyst
application by a controller that uses a DBIx::Class model?
Thank you.
Octavian
___
List: Catalyst@lists.rawmode.org
Listinfo:
Micah Jaffe wrote:
I'm trying to figure out the best[*] way to validate Chained actions at
various points along the action chain. By validate, I mean check if
the action should proceed or bomb out. Validation is not the same as
authentication; I may be logged in but I may not have
On 13/09/2007, Ian Docherty [EMAIL PROTECTED] wrote:
My application has (effectively, subject to some cut and paste) the
following.
package MyApp::Schema;
use strict;
use warning;
use base qw(DBIx::Class::Schema);
__PACKAGE__-load_classes(qw(
UsedPassword
));
Will Hawes wrote:
Whoops, my bad. $c-model() does indeed return a DBIx::Class::ResultSet,
so you would need to retrieve/create an instance of your UsedPassword
class from the resultset in order to call any methods on it:
my $used_password = $c-model('DBIC::UsedPassword')-create( { user =
On Thu, Sep 13, 2007 at 08:41:24AM -0400, Christopher H. Laco wrote:
Micah Jaffe wrote:
I'm trying to figure out the best[*] way to validate Chained actions at
various points along the action chain. By validate, I mean check if
the action should proceed or bomb out. Validation is not the
Octavian Rasnita wrote:
Hi,
Is it possible to log a certain SQL which is generated in a Catalyst
application by a controller that uses a DBIx::Class model?
$c-model('MyModel')-storage-debug(1);
Also have a look at:
http://search.cpan.org/dist/DBIx-Class-QueryLog/
On Thu, Sep 13, 2007 at 10:58:08AM +0100, Ian Docherty wrote:
I have found a thread on DBIx-class mailing list that throws some light
on this using
http://search.cpan.org/~ash/DBIx-Class-0.08006/lib/DBIx/Class/Schema.pm#load_namespaces
This seems to solve the problem for putting such
On Thu, Sep 13, 2007 at 03:35:46PM +0300, Octavian Rasnita wrote:
Hi,
Is it possible to log a certain SQL which is generated in a Catalyst
application by a controller that uses a DBIx::Class model?
Yes.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
On Thu, Sep 13, 2007 at 10:27:04AM +0100, Ian Docherty wrote:
Hi
My existing Catalyst application is being extended. I want to keep a
record of previous passwords used by a user to prevent them being re-used.
I have Model 'UsedPassword' to keep track of the previous 8 (say)
passwords as
Simon Wilcox wrote:
Will Hawes wrote:
Whoops, my bad. $c-model() does indeed return a
DBIx::Class::ResultSet, so you would need to retrieve/create an
instance of your UsedPassword class from the resultset in order to
call any methods on it:
my $used_password =
On 9/12/07, Mitchell Jackson [EMAIL PROTECTED] wrote:
Today I saw how easy it is to extend Template-Toolkit within Catalyst.
Perhaps somebody here will find this useful.
I wanted to easily format dollar amounts from within the tt2 template.
I had been doing this with [% FILTER format( %.2f )
On Thu, Sep 13, 2007 at 03:14:58PM +0100, Ian Docherty wrote:
Simon Wilcox wrote:
Will Hawes wrote:
Whoops, my bad. $c-model() does indeed return a
DBIx::Class::ResultSet, so you would need to retrieve/create an
instance of your UsedPassword class from the resultset in order to
call any
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?
Matt S Trout wrote:
On Thu, Sep 13, 2007 at 03:14:58PM +0100, Ian Docherty wrote:
Almost, if I do my $used_password =
$c-model('DBIC::UsedPassword')-result_class-create_limited();
it works. So that should do for now, thanks Simon and Will for your help ;)
No. Don't do that.
Really don't.
Simon Wilcox wrote:
Matt S Trout wrote:
On Thu, Sep 13, 2007 at 03:14:58PM +0100, Ian Docherty wrote:
Almost, if I do my $used_password =
$c-model('DBIC::UsedPassword')-result_class-create_limited();
it works. So that should do for now, thanks Simon and Will for your help ;)
No. Don't do
22 matches
Mail list logo