[ create a new paste ] login | about

Link: http://codepad.org/rCr0uoWU    [ raw code | output | fork ]

Perl, pasted on May 10:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
    package Dead;
    sub new{
        my $pkg = shift;
        bless { @_ }, $pkg;
    }
}

eval {
  open my $fh, '>', '.' or die Dead->new(message => $!);
};
if ($@){
    use  Data::Dumper;
    print STDERR Dumper($@);
}


Output:
1
2
3
$VAR1 = bless( {
                 'message' => 'Is a directory'
               }, 'Dead' );


Create a new paste based on this one


Comments: