On 29 Jan 2007, at 13:12, Jonas Alves wrote:
I have tried your aproach before. You can't delete the
'new_password' and 'confirm_new_password' or the confirm_password
is not checked against 'new_password'.
You have to live with the warnings in the error log.
But it doesn't work for me either. The problem is that
Reaction::InterfaceModel::Action::User::SetPassword and
Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques both
override 'error_for_attribute' and 'can_apply'. So if you have
unique constraints in your schema they don't get evaluated if your
class extends from User::SetPassword before ResultSet::Create
or if you reverse the order then your confirm password is not
checked. I tried to change the methods from override to augment and
the super() call to an inner() call but i got following error:
Moose::Role cannot support 'augment' at /usr/local/share/perl/5.8.7/
Moose/Role.pm line 138
We almost certainly want to be using roles for all of this with around
() so it can wrap in-place and doesn't automatically jump to superclass.
The current user stuff is mostly a very simple convenience API that
needs its guts factoring out into more easily composable components.
Patches to do so welcome :)
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
_______________________________________________
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/