File Coverage

blib/lib/sys.pm
Criterion Covered Total %
statement 16 18 88.8
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 22 24 91.6


line stmt bran cond sub pod time code
1              
2             # #############################################################
3             # ### Generated by GenerateVarMap.PL.
4             # ###
5             # ### Please edit the master and *not* this file.
6             # ### Date of render: Fri Mar 7 13:15:44 2008
7             ##############################################################
8              
9             package sys;
10              
11 1     1   34787 use strict;
  1         2  
  1         38  
12 1     1   5 use warnings;
  1         1  
  1         25  
13 1     1   1002 use version;
  1         3934  
  1         5  
14             our $VERSION = qv('0.2');
15              
16 1     1   81 use Carp 'confess';
  1         2  
  1         67  
17 1     1   5 use Scalar::Util 'blessed';
  1         2  
  1         110  
18              
19 0           use Class::Dot::Meta::Method qw(
20             install_sub_from_coderef
21 1     1   482 );
  0            
22              
23             sub import {
24             my ($this_class, @args) = @_;
25             my $caller_class = caller 0;
26              
27             install_sub_from_coderef( sub {
28             sys->new()
29             } => ($caller_class, "sys")
30             );
31             }
32              
33              
34             use Class::Dot2;
35             use sys::process;
36             use sys::input;
37             use sys::interpolation;
38             use sys::re::match;
39             use sys::os;
40             use sys::process::group;
41             use sys::process::user;
42             use sys::output;
43             use sys::format;
44             use sys::eval;
45             use sys::re;
46             {
47              
48             has "process" => (isa => "sys::process");
49             has "input" => (isa => "sys::input");
50             has "interpolation" => (isa => "sys::interpolation");
51             has "match" => (isa => "sys::re::match");
52             has "os" => (isa => "sys::os");
53             has "group" => (isa => "sys::process::group");
54             has "user" => (isa => "sys::process::user");
55             has "output" => (isa => "sys::output");
56             has "format" => (isa => "sys::format");
57             has "eval" => (isa => "sys::eval");
58             has "re" => (isa => "sys::re");
59              
60             sub process {
61             return defined $_[0] && blessed $_[0]
62             ? $_[0]->__getattr__("process")
63             : sys::process->new();
64             }
65             sub input {
66             return defined $_[0] && blessed $_[0]
67             ? $_[0]->__getattr__("input")
68             : sys::input->new();
69             }
70             sub interpolation {
71             return defined $_[0] && blessed $_[0]
72             ? $_[0]->__getattr__("interpolation")
73             : sys::interpolation->new();
74             }
75             sub match {
76             return defined $_[0] && blessed $_[0]
77             ? $_[0]->__getattr__("match")
78             : sys::re::match->new();
79             }
80             sub os {
81             return defined $_[0] && blessed $_[0]
82             ? $_[0]->__getattr__("os")
83             : sys::os->new();
84             }
85             sub group {
86             return defined $_[0] && blessed $_[0]
87             ? $_[0]->__getattr__("group")
88             : sys::process::group->new();
89             }
90             sub user {
91             return defined $_[0] && blessed $_[0]
92             ? $_[0]->__getattr__("user")
93             : sys::process::user->new();
94             }
95             sub output {
96             return defined $_[0] && blessed $_[0]
97             ? $_[0]->__getattr__("output")
98             : sys::output->new();
99             }
100             sub format {
101             return defined $_[0] && blessed $_[0]
102             ? $_[0]->__getattr__("format")
103             : sys::format->new();
104             }
105             sub eval {
106             return defined $_[0] && blessed $_[0]
107             ? $_[0]->__getattr__("eval")
108             : sys::eval->new();
109             }
110             sub re {
111             return defined $_[0] && blessed $_[0]
112             ? $_[0]->__getattr__("re")
113             : sys::re->new();
114             }
115              
116             sub warnings {
117             if ($_[1]) {
118             return $^W = $_[1];
119             };
120            
121             return $^W; # SCALAR
122             }
123             sub executable_name {
124             if ($_[1]) {
125             return $^W = $_[1];
126             };
127            
128             return $^W; # SCALAR
129             }
130             sub stderr {
131            
132             return \*STDERR; # GLOB
133             }
134             sub accumulator {
135             if ($_[1]) {
136             return $^A = $_[1];
137             };
138            
139             return $^A; # SCALAR
140             }
141             sub exceptions_being_caught {
142             if ($_[1]) {
143             return $^S = $_[1];
144             };
145            
146             return $^S; # SCALAR
147             }
148             sub version {
149             if ($_[1]) {
150             return $^V = $_[1];
151             };
152            
153             return $^V; # SCALAR
154             }
155             sub arg {
156             if ($_[1]) {
157             return $_ = $_[1];
158             };
159            
160             return $_; # SCALAR
161             }
162             sub debugging {
163             if ($_[1]) {
164             return $^D = $_[1];
165             };
166            
167             return $^D; # SCALAR
168             }
169             sub basetime {
170             if ($_[1]) {
171             return $^T = $_[1];
172             };
173            
174             return $^T; # SCALAR
175             }
176             sub inplace_edit {
177             if ($_[1]) {
178             return $^I = $_[1];
179             };
180            
181             return $^I; # SCALAR
182             }
183             sub compiling {
184             if ($_[1]) {
185             return $^C = $_[1];
186             };
187            
188             return $^C; # SCALAR
189             }
190             sub stdout {
191            
192             return \*STDOUT; # GLOB
193             }
194             sub last_regexp_code_result {
195             if ($_[1]) {
196             return $^R = $_[1];
197             };
198            
199             return $^R; # SCALAR
200             }
201             sub perldb {
202             if ($_[1]) {
203             return $^P = $_[1];
204             };
205            
206             return $^P; # SCALAR
207             }
208              
209             }
210              
211             1;
212              
213             # Local Variables:
214             # mode: cperl
215             # cperl-indent-level: 4
216             # fill-column: 78
217             # End:
218             # vim: expandtab tabstop=4 shiftwidth=4 shiftround
219              
220             __END__