File: leaky_dollar_bang.t

package info (click to toggle)
libdata-uuid-perl 1.227-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 176 kB
  • sloc: ansic: 328; perl: 70; makefile: 3
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");
}