line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package loose; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
735
|
use vars qw($VERSION @ISA @EXPORT); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
116
|
|
4
|
|
|
|
|
|
|
$VERSION = '0.01'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
# Just for irony value. |
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
242
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
require Exporter; |
10
|
|
|
|
|
|
|
@ISA = qw(Exporter); |
11
|
|
|
|
|
|
|
@EXPORT = qw(die); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my @excuses = ('Not my job.', |
14
|
|
|
|
|
|
|
"I'm on my break.", |
15
|
|
|
|
|
|
|
'Whatever.', |
16
|
|
|
|
|
|
|
"That's nice.", |
17
|
|
|
|
|
|
|
'So what am I supposed to do about it?', |
18
|
|
|
|
|
|
|
'Uh huh.', |
19
|
|
|
|
|
|
|
'Yeah, sure.', |
20
|
|
|
|
|
|
|
'False alarm.', |
21
|
|
|
|
|
|
|
"I don't get paid enough to care.", |
22
|
|
|
|
|
|
|
'Talk to the union.', |
23
|
|
|
|
|
|
|
'Not in my job description to care.' |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub die { |
27
|
0
|
0
|
|
0
|
0
|
|
if( int rand(10) ) { |
28
|
0
|
|
|
|
|
|
print STDERR $excuses[rand @excuses]."\n"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
else { |
31
|
0
|
|
|
|
|
|
CORE::die @_; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$SIG{__WARN__} = sub { |
36
|
|
|
|
|
|
|
if( int rand(10) ) { |
37
|
|
|
|
|
|
|
print STDERR $excuses[rand @excuses]."\n"; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
else { |
40
|
|
|
|
|
|
|
warn @_; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
return "Slacker."; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=pod |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
loose - Perl pragma to allow unsafe constructs |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SYNOPSIS |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
use loose; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
loose.pm provides you with a slack, casual environment in which to |
60
|
|
|
|
|
|
|
write your Perl code. It doesn't get hung up on little things like |
61
|
|
|
|
|
|
|
warnings and die() calls, it just lets them slide. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Use loose.pm to help relieve stress at the work place. loose helps to |
64
|
|
|
|
|
|
|
make your error logs shorter by getting right of all those wordly |
65
|
|
|
|
|
|
|
warning messages. |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 BUGS |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Yeah, probably. Who cares? |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 AUTHOR |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Michael G Schwern |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|