Mercurial > pub > Impl
comparison _test/Test/Web/Application.pm @ 60:b0c068da93ac
Lazy activation for the configuration objects (final concept)
small fixes
author | wizard |
---|---|
date | Tue, 09 Mar 2010 19:47:39 +0300 |
parents | |
children | 8d0ae27d15c1 |
comparison
equal
deleted
inserted
replaced
59:0f3e369553bd | 60:b0c068da93ac |
---|---|
1 package Test::Web::Application::Instance; | |
2 package Test::Web::Application; | |
3 use strict; | |
4 use base qw(IMPL::Test::Unit); | |
5 | |
6 use IMPL::Test qw(test failed); | |
7 require IMPL::Web::Application; | |
8 | |
9 __PACKAGE__->PassThroughArgs; | |
10 | |
11 sub CTOR { | |
12 # simulate CGI environment | |
13 } | |
14 | |
15 test SpawnApp => sub { | |
16 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); | |
17 | |
18 return 1; | |
19 }; | |
20 | |
21 test ActivateOnDemand => sub { | |
22 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml'); | |
23 | |
24 my $ds = $instance->dataSource; | |
25 | |
26 return 1; | |
27 }; | |
28 | |
29 package Test::Web::Application::Instance; | |
30 use base qw(IMPL::Web::Application); | |
31 | |
32 __PACKAGE__->PassThroughArgs; | |
33 | |
34 use IMPL::Class::Property; | |
35 | |
36 BEGIN { | |
37 public property name => prop_all; | |
38 public property options => prop_all; | |
39 public property dataSource => prop_all; | |
40 public property securityMod => prop_all; | |
41 } | |
42 | |
43 | |
44 1; |