File tree Expand file tree Collapse file tree 2 files changed +15
-20
lines changed Expand file tree Collapse file tree 2 files changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ require XSLoader;
13
13
%EXPORT_TAGS = (
14
14
' glob' => [ qw(
15
15
GLOB_ABEND
16
- GLOB_ALPHASORT
16
+ GLOB_ALPHASORT
17
17
GLOB_ALTDIRFUNC
18
18
GLOB_BRACE
19
19
GLOB_CSH
@@ -29,15 +29,13 @@ require XSLoader;
29
29
GLOB_QUOTE
30
30
GLOB_TILDE
31
31
bsd_glob
32
- glob
33
32
) ],
34
33
);
35
34
$EXPORT_TAGS {bsd_glob } = [@{$EXPORT_TAGS {glob }}];
36
- pop @{$EXPORT_TAGS {bsd_glob }}; # no "glob"
37
35
38
36
@EXPORT_OK = (@{$EXPORT_TAGS {' glob' }}, ' csh_glob' );
39
37
40
- $VERSION = ' 1.31 ' ;
38
+ $VERSION = ' 1.32 ' ;
41
39
42
40
sub import {
43
41
require Exporter;
@@ -72,17 +70,11 @@ if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) {
72
70
$DEFAULT_FLAGS |= GLOB_NOCASE();
73
71
}
74
72
75
- # File::Glob::glob() is deprecated because its prototype is different from
76
- # CORE::glob() (use bsd_glob() instead)
73
+ # File::Glob::glob() removed in perl-5.30 because its prototype is different
74
+ # from CORE::glob() (use bsd_glob() instead)
77
75
sub glob {
78
- use 5.024;
79
- use warnings ();
80
- warnings::warnif (deprecated =>
81
- " File::Glob::glob() will disappear in perl 5.30. " .
82
- " Use File::Glob::bsd_glob() instead." ) unless state $warned ++;
83
-
84
- splice @_ , 1; # no flags
85
- goto &bsd_glob;
76
+ die " File::Glob::glob() was removed in perl 5.30. " .
77
+ " Use File::Glob::bsd_glob() instead. $! " ;
86
78
}
87
79
88
80
1;
Original file line number Diff line number Diff line change @@ -44,17 +44,20 @@ if (opendir(D, ".")) {
44
44
@correct = grep { !/^\./ } sort readdir (D);
45
45
closedir D;
46
46
}
47
- my @a = do {no warnings ' deprecated' ; File::Glob::glob (" *" , 0);};
48
- @a = sort @a ;
49
- if (GLOB_ERROR) {
50
- fail(GLOB_ERROR);
51
- } else {
52
- is_deeply(\@a , \@correct );
47
+ {
48
+ local $@ ;
49
+ my $expect =
50
+ qr / File::Glob::glob\(\) was removed in perl 5\. 30\. Use File::Glob::bsd_glob\(\) instead/ ;
51
+ eval { File::Glob::glob (" *" , 0); };
52
+ like $@ , $expect ,
53
+ " Got expected error message for removal of File::Glob::glob()" ;
53
54
}
54
55
chdir ' ..' or die " chdir .. $! " ;
55
56
56
57
# look up the user's home directory
57
58
# should return a list with one item, and not set ERROR
59
+ my @a ;
60
+
58
61
SKIP: {
59
62
my ($name , $home );
60
63
skip $^O, 1 if $^O eq ' MSWin32' || $^O eq ' NetWare' || $^O eq ' VMS'
You can’t perform that action at this time.
0 commit comments