| 1 | package loose; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use vars qw($VERSION @ISA @EXPORT); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | $VERSION = '0.01'; | |||||||||
| 5 | |||||||||||
| 6 | # Just for irony value. | ||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | require Exporter; | |||||||||
| 10 | 1 | @ISA = qw(Exporter); | |||||||||
| 11 | 1 | @EXPORT = qw(die); | |||||||||
| 12 | |||||||||||
| 13 | 1 | 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 | 0 | ▶ | sub die { | ||||||||
|
Subroutine
die: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 27 | 0 | ▶ | if( int rand(10) ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 0 | print STDERR $excuses[rand @excuses]."\n"; | |||||||||
| 29 | } | ||||||||||
| 30 | else { | ||||||||||
| 31 | 0 | CORE::die @_; | |||||||||
| 32 | } | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | $SIG{__WARN__} = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 36 | 0 | ▶ | if( int rand(10) ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 37 | 0 | print STDERR $excuses[rand @excuses]."\n"; | |||||||||
| 38 | } | ||||||||||
| 39 | else { | ||||||||||
| 40 | 0 | warn @_; | |||||||||
| 41 | } | ||||||||||
| 42 | 1 | }; | |||||||||
| 43 | |||||||||||
| 44 | |||||||||||
| 45 | 1 | 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 <schwern@pobox.com> | ||||||||||
| 74 | |||||||||||
| 75 | =cut | ||||||||||
| 76 | |||||||||||