File: leaky_dollar_bang.t

package info (click to toggle)
libdata-uuid-perl 1.219-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 184 kB
  • ctags: 136
  • sloc: ansic: 344; perl: 70; makefile: 11
file content (15 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use strict;
use warnings;
use Test::More tests => 1;
use Data::UUID qw(NameSpace_DNS);

my $generator = new Data::UUID;
open(my $bad_fh,"<","/a/failing/path/that/does/not/exist/but/sets/dollarbang");

    eval { 
        ok($generator->create_from_name_str( NameSpace_DNS, '1.2.3.4' ), "\$! didn't leak!");;
    };

if (my $msg = $@) {
    ok(undef, "create_from_name_str failed: $msg");
}