--- trunk/lib/App/RoomReservation/Reservation.pm 2009/07/02 17:59:56 1164 +++ trunk/lib/App/RoomReservation/Reservation.pm 2009/07/02 18:28:17 1165 @@ -7,7 +7,7 @@ subtype 'Email', as 'Str', where { /^$RE{Email}{Address}$/ }, - message { "$_ is not valid e-mail" }; + message { qq|$_ is not valid e-mail address| }; extends 'App::RoomReservation'; @@ -111,16 +111,22 @@ sub BUILD { my $self = shift; my $email = $self->email; - die "e-mail not verified\n" unless $email eq $self->email_verify; + die qq|e-mail addresses not same| unless $email eq $self->email_verify; my $sth = $self->dbh->prepare(qq{ select count(*) from reservation where email = ? }); $sth->execute( $email ); my ($registred) = $sth->fetchrow_array; if ( $registred ) { - die qq| + die + qq| + e-mail address $email allready registred - | . $self->seat_confirmation_message( email => $email ) + | + . $self->seat_confirmation_message( email => $email ) + . qq| + + | ; } }