9 |
|
|
10 |
sub dsn { 'DBI:Pg:dbname=room-reservation' } |
sub dsn { 'DBI:Pg:dbname=room-reservation' } |
11 |
|
|
12 |
|
=head1 DEPLOY |
13 |
|
|
14 |
|
$ createdb --encoding=utf-8 room-reservation |
15 |
|
|
16 |
|
=cut |
17 |
|
|
18 |
our $dbh; |
our $dbh; |
19 |
sub dbh { |
sub dbh { |
20 |
my ($self) = @_; |
my ($self) = @_; |
34 |
my $url = $self->url_for( 'Reservation/create_as_markup' ); |
my $url = $self->url_for( 'Reservation/create_as_markup' ); |
35 |
|
|
36 |
return |
return |
37 |
App::RoomReservation::Room->new->room_markup |
App::RoomReservation::Room->new->room_as_markup |
38 |
. qq|<a target="App::RoomReservation::Reservation" href="$url">seat reservation</a>| |
. qq|<a target="App::RoomReservation::Reservation" href="$url">seat reservation</a>| |
39 |
; |
; |
40 |
} |
} |
52 |
Class::MOP::load_class( $class ); |
Class::MOP::load_class( $class ); |
53 |
die "$class doesn't implement $method" unless $class->meta->has_method($method); |
die "$class doesn't implement $method" unless $class->meta->has_method($method); |
54 |
|
|
55 |
return "http://192.168.1.13:3000/$app"; |
return |
56 |
|
$self->request_url->scheme . '://' . $self->request_url->authority . '/' . $app; |
57 |
} |
} |
58 |
|
|
59 |
__PACKAGE__->meta->make_immutable; |
__PACKAGE__->meta->make_immutable; |