Skip to content
Browse files

docs improved

  • Loading branch information...
1 parent 53ffe51 commit b658224d5fc3a13ab89b033f0b834a7ff735c9bf Zbigniew Lukasiak committed Nov 5, 2011
Showing with 14 additions and 14 deletions.
  1. +7 −7 README.pod
  2. +7 −7 lib/Plack/App/ResetPass.pm
View
14 README.pod
@@ -141,11 +141,11 @@ version 0.001
=head1 SYNOPSIS
+ # connecting with DBIx::Class
{
package My::ResetPass;
use parent 'Plack::App::ResetPass';
-
- # connecting with DBIx::Class
+ use Plack::Util::Accessor qw( schema );
sub find_user {
my( $self, $name ) = @_;
@@ -155,15 +155,15 @@ version 0.001
}
sub update_user {
- my( $self, $user, %attrs ) = @_;
- $user->update( \%attrs );
+ my( $self, $user, $attrs ) = @_;
+ $user->update( $attrs );
}
}
use Plack::Builder;
- my $app = My::ResetPass->new;
+ my $app = My::ResetPass->new( schema => $schema );
builder {
mount "/forgotten_pass" => builder {
@@ -195,9 +195,9 @@ Should return a following tuple
The C<$user> is user object - passed to the C<update_user> method
-=item update_user ( user, %params )
+=item update_user ( user, params )
-Should update the user object with %params.
+Should update the user object with params.
It is used for saving the new password and verification token.
=back
View
14 lib/Plack/App/ResetPass.pm
@@ -130,11 +130,11 @@ __END__
=head1 SYNOPSIS
+ # connecting with DBIx::Class
{
package My::ResetPass;
use parent 'Plack::App::ResetPass';
-
- # connecting with DBIx::Class
+ use Plack::Util::Accessor qw( schema );
sub find_user {
my( $self, $name ) = @_;
@@ -144,15 +144,15 @@ __END__
}
sub update_user {
- my( $self, $user, %attrs ) = @_;
- $user->update( \%attrs );
+ my( $self, $user, $attrs ) = @_;
+ $user->update( $attrs );
}
}
use Plack::Builder;
- my $app = My::ResetPass->new;
+ my $app = My::ResetPass->new( schema => $schema );
builder {
mount "/forgotten_pass" => builder {
@@ -184,9 +184,9 @@ Should return a following tuple
The C<$user> is user object - passed to the C<update_user> method
-=item update_user ( user, %params )
+=item update_user ( user, params )
-Should update the user object with %params.
+Should update the user object with params.
It is used for saving the new password and verification token.
=back

0 comments on commit b658224

Please sign in to comment.
Something went wrong with that request. Please try again.