Excellent, that works - Thank you!
On 3/5/07, Juan Miguel Paredes [EMAIL PROTECTED] wrote:
On 3/5/07, Scott Thomson [EMAIL PROTECTED] wrote:
Ok, I think I'm close...
My main schema class:
package DB;
use base qw/DBIx::Class::Schema DBIx::Class::AccessorGroup/;
On Mar 5, 2007, at 7:02 AM, Scott Thomson wrote:
Ok, I think I'm close...
My main schema class:
package DB;
use base qw/DBIx::Class::Schema DBIx::Class::AccessorGroup/;
__PACKAGE__-mk_group_accessors(simple = 'context');
__PACKAGE__-load_classes(qw//);
1;
Very Bad Things are likely to
Noted and actioned, Cheers.
Very 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/
A witty saying proves
On 3/5/07, Scott Thomson [EMAIL PROTECTED] wrote:
Ok, I think I'm close...
My main schema class:
package DB;
use base qw/DBIx::Class::Schema DBIx::Class::AccessorGroup/;
__PACKAGE__-mk_group_accessors(simple = 'context');
__PACKAGE__-load_classes(qw//);
1;
My model class...
package
Hi,
This is exactly what I want to do, however I can't seem to get my head round
how to implement this solution, I've tried various incarnations but I don't
seem to be getting anywhere.
Annotations below, thanks for patience.
Scott
On 2/1/07, Juan Miguel Paredes [EMAIL PROTECTED] wrote:
On
On 31 Jan 2007, at 19:27, Juan Miguel Paredes wrote:
On 1/31/07, Matt S Trout [EMAIL PROTECTED] wrote:
On 31 Jan 2007, at 15:23, Juan Miguel Paredes wrote:
Hi, all!
What if we have to overload ACCEPT_CONTEXT to do something like
this,
but using DBIC::Schema? What would be the
On 2/1/07, Matt S Trout [EMAIL PROTECTED] wrote:
package MyApp::DataStore; # or whatever this is called
use base qw/DBIx::Class::Schema/;
__PACKAGE__-mk_group_accessors(simple = 'context');
then
my $new = bless ...
$new-schema(bless(...)); # same trick on the schema
On 12/27/06, Ash Berlin [EMAIL PROTECTED] wrote:
Mark Zealey wrote:
Hi there,
I'm basically wanting to write a simple log function which logs hits on my
website as entries in a database (automatically adding $c-user-{id} and
$c-req-referrer etc), but to do so I want to use a model (I
On 31 Jan 2007, at 15:23, Juan Miguel Paredes wrote:
On 12/27/06, Ash Berlin [EMAIL PROTECTED] wrote:
Mark Zealey wrote:
Hi there,
I'm basically wanting to write a simple log function which logs
hits on my
website as entries in a database (automatically adding $c-user-
{id} and
On 1/31/07, Matt S Trout [EMAIL PROTECTED] wrote:
On 31 Jan 2007, at 15:23, Juan Miguel Paredes wrote:
Hi, all!
What if we have to overload ACCEPT_CONTEXT to do something like this,
but using DBIC::Schema? What would be the recommended inheritance
chain? Catalyst::Model::DBIC::Schema
Hi there,
I'm basically wanting to write a simple log function which logs hits on my
website as entries in a database (automatically adding $c-user-{id} and
$c-req-referrer etc), but to do so I want to use a model (I think). Any
ideas how I can just say $c-model('Log')-info(foo) and
you can passa the $c from controller to model
$c-model(foo)-bar($c,$foobar);
On 12/27/06, Mark Zealey [EMAIL PROTECTED] wrote:
Hi there,
I'm basically wanting to write a simple log function which logs hits on my
website as entries in a database (automatically adding $c-user-{id} and
Mark Zealey wrote:
Hi there,
I'm basically wanting to write a simple log function which logs hits on my
website as entries in a database (automatically adding $c-user-{id} and
$c-req-referrer etc), but to do so I want to use a model (I think). Any
ideas how I can just say
--- Lorn [EMAIL PROTECTED] wrote:
you can passa the $c from controller to model
$c-model(foo)-bar($c,$foobar);
I'd vote for this method over setting the context,
since one of the goals of a model is to not care about
how or when it's called, that way you are encouraging
yourself to not build
On Wednesday 27 December 2006 1:01 pm, Ash Berlin wrote:
Very very *VERY* bad idea.
__PACKAGE__-mk_accessors(context);
sub ACCEPT_CONTEXT {
my ($self, $c, @args) = @_;
my $new = bless({ %$self }, ref $self);
$new-context($c);
return $new;
}
Isn't that really really slow
On 12/27/06, Mark Zealey [EMAIL PROTECTED] wrote:
Hi there,
I'm basically wanting to write a simple log function which logs hits on my
website as entries in a database (automatically adding $c-user-{id} and
$c-req-referrer etc), but to do so I want to use a model (I think). Any
ideas how I can
Isn't that really really slow though? Constructing a new object for each call?
No, it's not. Creating an object in Perl amounts to setting a flag (the
OBJECT flag in subclasses of SvPVMG, to be exact).
See illguts: http://gisle.aas.no/perl/illguts/
--
package JAPH;use Catalyst
--- Eden Cardim [EMAIL PROTECTED] wrote:
On 12/27/06, Mark Zealey [EMAIL PROTECTED] wrote:
Hi there,
I'm basically wanting to write a simple log
function which logs hits on my
website as entries in a database (automatically
adding $c-user-{id} and
$c-req-referrer etc), but to do so
18 matches
Mail list logo