From: "Simon Wilcox" <[EMAIL PROTECTED]>
You will have to iterate over the accessors individually to put them into the stash (I think) but you should be able to use DBIC to do most of the thinking. Something like (untested): my $model = $c->model("Database::Table"); foreach my $column (@{$model->columns}) { $column =~ s{me\.}{}; # strip the prefix DBIC adds $c->stash->{$column} = $obj->$column; }
Ok, thank you. This is what I needed.
You may need to adjust some of the above to get it to recognise $column as an accessor.
I hope I won't have any problem, or I think I can use $obj->get_column($column).
Thank you all. Octavian _______________________________________________ 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/