annotate _test/temp.pl @ 197:6b1dda998839

Added IMPL::declare, IMPL::require, to simplify module definitions IMPL::Transform now admires object inheritance while searching for the transformation Added HTTP some exceptions IMPL::Web::Application::RestResource almost implemented
author sergey
date Thu, 19 Apr 2012 02:10:02 +0400
parents 4d0e1962161c
children 2ffe6f661605
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
83
74bae30eb25e (no commit message)
wizard
parents:
diff changeset
1 #!/usr/bin/perl
93
0667064553ef fixed _is_class in activator
wizard
parents: 86
diff changeset
2 use strict;
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
3
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
4 package Bar;
93
0667064553ef fixed _is_class in activator
wizard
parents: 86
diff changeset
5
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
6 sub CTOR {
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
7 shift;
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
8 warn @_;
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
9 }
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
10
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
11 package Foo;
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
12
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
13 use IMPL::declare {
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
14 require => {
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
15 TObject => 'IMPL::Object'
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
16 },
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
17 base => {
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
18 TObject => '@_',
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
19 -Bar => '@_'
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
20 }
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
21 };
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
22
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
23 sub hello {
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
24 return TObject;
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
25 }
134
44977efed303 Significant performance optimizations
wizard
parents: 125
diff changeset
26
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
27 package main;
167
1f7a6d762394 SQL schema in progress
sourcer
parents: 141
diff changeset
28
197
6b1dda998839 Added IMPL::declare, IMPL::require, to simplify module definitions
sergey
parents: 194
diff changeset
29 print Foo->new(qw(one for me))->hello;