/[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 1086 by dpavlin, Sun Jun 28 14:21:10 2009 UTC revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 3  use Moose; Line 3  use Moose;
3    
4  extends 'Frey';  extends 'Frey';
5  with 'Frey::Web';  with 'Frey::Web';
 #with 'Frey::Storage';  
6    
7  with 'App::RoomReservation::Room';  use lib 'lib';
8    use App::RoomReservation::Room;
9    
10    sub dsn { 'DBI:Pg:dbname=room-reservation' }
11    
12    our $dbh;
13    sub dbh {
14            my ($self) = @_;
15    
16            return $dbh if defined $dbh;
17    
18            $dbh = DBI->connect( $self->dsn, '', '', { RaiseError => 1 } ) || die $DBI::errstr;
19            $dbh->do( qq{ set client_encoding='utf-8' } ) if $self->dsn =~ m{pg}i;
20    
21            return $dbh;
22    }
23    
24  sub as_markup {  sub as_markup {
25          my ($self) = @_;          my ($self) = @_;
26    
27          $self->room_markup          App::RoomReservation::Room->new->room_markup
28            . qq|<a target="App::RoomReservation::Reservation" href="/App::RoomReservation::Reservation/create_as_markup">seat reservation</a>|
29            ;
30  }  }
31    
32    __PACKAGE__->meta->make_immutable;
33    no Moose;
34    
35  1;  1;

Legend:
Removed from v.1086  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26