/[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

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

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

revision 1097 by dpavlin, Sun Jun 28 18:51:49 2009 UTC revision 1098 by dpavlin, Sun Jun 28 22:14:22 2009 UTC
# Line 5  extends 'Frey'; Line 5  extends 'Frey';
5  with 'Frey::Web';  with 'Frey::Web';
6  #with 'Frey::Storage';  #with 'Frey::Storage';
7    
8    use lib 'lib';
9  use App::RoomReservation::Room;  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 {  sub as_markup {
26          my ($self) = @_;          my ($self) = @_;
27    
28          App::RoomReservation::Room->new->room_markup          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;  1;

Legend:
Removed from v.1097  
changed lines
  Added in v.1098

  ViewVC Help
Powered by ViewVC 1.1.26