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?
I'm not sure I would structure the code exactly like you did. I think I
would add a method to the User class like:
package My::Schema::User;
...
sub set_password { txn_do(update current password, update used
passwords) }
Then you can say something like:
$c->model('DBIC::Users')->find(42)->set_password('foobarbaz');
and have everything work.
Finally, if you want your create_limited to work, try:
package My::ResultSet::UsedPassword;
use base 'DBIx::Class::ResultSet';
sub create_limited { ... };
package My::Schema::UsedPassword;
__PACKAGE__->resultset_class('My::ResultSet::UsedPassword');
Regards,
Jonathan Rockway
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
