annotate _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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
60
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
1 package Test::Web::Application::Instance;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
2 package Test::Web::Application;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
3 use strict;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
4 use base qw(IMPL::Test::Unit);
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
5
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
6 use IMPL::Test qw(test failed);
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
7 require IMPL::Web::Application;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
8
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
9 __PACKAGE__->PassThroughArgs;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
10
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
11 sub CTOR {
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
12 # simulate CGI environment
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
13 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
14
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
15 test SpawnApp => sub {
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
16 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
17
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
18 return 1;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
19 };
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
20
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
21 test ActivateOnDemand => sub {
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
22 my $instance = spawn Test::Web::Application::Instance('Resources/app.xml');
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
23
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
24 my $ds = $instance->dataSource;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
25
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
26 return 1;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
27 };
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
28
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
29 package Test::Web::Application::Instance;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
30 use base qw(IMPL::Web::Application);
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
31
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
32 __PACKAGE__->PassThroughArgs;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
33
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
34 use IMPL::Class::Property;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
35
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
36 BEGIN {
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
37 public property name => prop_all;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
38 public property options => prop_all;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
39 public property dataSource => prop_all;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
40 public property securityMod => prop_all;
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
41 }
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
42
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
43
b0c068da93ac Lazy activation for the configuration objects (final concept)
wizard
parents:
diff changeset
44 1;