/[Frey]/trunk/lib/App/RoomReservation/Reservation.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/App/RoomReservation/Reservation.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1117 by dpavlin, Mon Jun 29 12:11:14 2009 UTC revision 1118 by dpavlin, Tue Jun 30 09:42:37 2009 UTC
# Line 1  Line 1 
1  package App::RoomReservation::Reservation;  package App::RoomReservation::Reservation;
2  use Moose;  use Moose;
3    
4    use Moose::Util::TypeConstraints;
5    use Regexp::Common qw[Email::Address];
6    
7    subtype 'Email',
8            as 'Str',
9            where { /^$RE{Email}{Address}$/ },
10            message { "$_ is not valid e-mail" };
11    
12  extends 'App::RoomReservation';  extends 'App::RoomReservation';
13    
14  use lib 'lib';  use lib 'lib';
# Line 56  has mobitel => ( Line 64  has mobitel => (
64    
65  has email => (  has email => (
66          is => 'rw',          is => 'rw',
67          isa => 'Str',          isa => 'Email',
68          required => 1,          required => 1,
69  );  );
70    
71  has email_verify => (  has email_verify => (
72          is => 'rw',          is => 'rw',
73          isa => 'Str',          isa => 'Email',
74          required => 1,          required => 1,
75  );  );
76    
77  has _confirmed => (  has _confirmed => (
78          is => 'rw',          is => 'rw',
79          isa => 'Bool',          isa => 'Bool',
80          required => 1,  #       required => 1,
81          default => sub { 0 },          default => sub { 0 },
82  );  );
83    
# Line 82  my @cols = Frey::PPI->new( class => __PA Line 90  my @cols = Frey::PPI->new( class => __PA
90  warn "# cols = ",join(',', @cols), $/;  warn "# cols = ",join(',', @cols), $/;
91    
92  sub token {  sub token {
         my ( $self ) = @_;  
93          my $self = shift;          my $self = shift;
94          my $sth = $self->dbh->prepare(qq{          my $sth = $self->dbh->prepare(qq{
95                  select md5( id || email ) from reservation where email = ?                  select md5( id || email ) from reservation where email = ?

Legend:
Removed from v.1117  
changed lines
  Added in v.1118

  ViewVC Help
Powered by ViewVC 1.1.26