/[Frey]/trunk/lib/App/RoomReservation.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

Contents of /trunk/lib/App/RoomReservation.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1098 - (show annotations)
Sun Jun 28 22:14:22 2009 UTC (14 years, 10 months ago) by dpavlin
File size: 662 byte(s)
added verification and cancelation of reservation
1 package App::RoomReservation;
2 use Moose;
3
4 extends 'Frey';
5 with 'Frey::Web';
6 #with 'Frey::Storage';
7
8 use lib 'lib';
9 use App::RoomReservation::Room;
10
11 sub dsn { 'DBI:Pg:dbname=room-reservation' }
12
13 our $dbh;
14 sub dbh {
15 my ($self) = @_;
16
17 return $dbh if defined $dbh;
18
19 $dbh = DBI->connect( $self->dsn, '', '', { RaiseError => 1 } ) || die $DBI::errstr;
20 $dbh->do( qq{ set client_encoding='utf-8' } ) if $self->dsn =~ m{pg}i;
21
22 return $dbh;
23 }
24
25 sub as_markup {
26 my ($self) = @_;
27
28 App::RoomReservation::Room->new->room_markup
29 . qq|<a target="App::RoomReservation::Reservation" href="/App::RoomReservation::Reservation/create_as_markup">seat reservation</a>|
30 ;
31 }
32
33 1;

  ViewVC Help
Powered by ViewVC 1.1.26