On 2/25/2011 4:06 AM, Tomas Doran bobtfish-at-bobtfish.net |Catalyst/Allow to
home| wrote:
__PACKAGE__->meta->make_immutable;
1;
And you then call $c->model('Foo')->data;
The implementation of the 'data' method could then later be replaced by an attribute
(i.e. has data => ( is => 'ro', isa => 'HashRef' );), and would then get the data from
config, or something more complex (e.g. to get the data out of DBI, or another model, or
whatever).
HTH
Cheers
t0m
Thanks. Is '$c->model('Foo')->data' what something like DBIC gives us, too? That is, is
a method named 'data' the convention? That is, if code was given a "result set" (I think
that is the right term) of a query that was made on one of the main standard model types,
what would the list of records look like?
Does 'MyApp_create.pl model' have any built-in stuff to generate a blank ad-hoc model like
you showed me?
Thanks for the help.
--John
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/