@@ -5,61 +5,6 @@ use lib 't/lib';
55use MetaCPAN::Document::Module ();
66use Test::More;
77
8- subtest hide_from_pause => sub {
9- foreach my $test (
10-
11- # The original:
12- [ ' No::CommentNL' => " package # hide\n No::CommentNL;" ],
13-
14- # I'm not sure how PAUSE handles this one but currently we ignore it.
15- [ ' No::JustNL' => " package \n No::JustNL;" ],
16-
17- # The good ones:
18- [ ' Pkg' => ' package Pkg;' ],
19- [ ' Pkg::Ver' => ' package Pkg::Ver v1.2.3;' ],
20- [ ' Pkg::Block' => ' package Pkg::Block { our $var = 1 }' ],
21- [
22- ' Pkg::VerBlock' => ' package Pkg::VerBlock 1.203 { our $var = 1 }'
23- ],
24- [ ' Pkg::SemiColons' => ' ; package Pkg::SemiColons; $var' ],
25- [ ' Pkg::InABlock' => ' { package Pkg::InABlock; $var }' ],
26-
27- # This doesn't work as a BOM can only appear at the start of a file.
28- # [ 'Pkg::AfterABOM' => "\xef\xbb\xbfpackage Pkg::AfterABOM" ],
29-
30- [ ' No::JustVar' => qq[ "\n\$ package No::JustVar;\n "] ],
31-
32- # This shouldn't match, but there's only so much we can do...
33- # we're not going to eval the whole file to figure it out.
34- [ ' Pkg::InsideStr' => qq[ "\n package Pkg::InsideStr;\n "] ],
35-
36- [ ' No::Comment' => qq[ # package No::Comment;\n ] ],
37- [ ' No::Different' => q[ package No::Different::Pkg;] ],
38- [ ' No::PkgWithNum' => qq[ "\n package No::PkgWithNumv2.3;\n "] ],
39- [ ' No::CrazyChars' => qq[ "\n package No::CrazyChars\[ 0\] ;\n "] ],
40- )
41- {
42- my ( $name , $content ) = @$test ;
43-
44- subtest $name => sub {
45- my $module = MetaCPAN::Document::Module-> new( name => $name );
46-
47- SKIP: {
48- skip( ' Perl 5.14 needed for package block compilation' , 1 )
49- if $] < 5.014;
50- # # no critic
51- ok eval " sub { no strict; $content }" , " code compiles"
52- or diag $@ ;
53- }
54-
55- my ($hidden ) = ( $name =~ / ^No::/ ? 1 : 0 );
56-
57- is $module -> hide_from_pause($content ), $hidden ,
58- " hide_from_pause is $hidden " ;
59- };
60- }
61- };
62-
638subtest set_associated_pod => sub {
649 test_associated_pod( ' Squirrel' , [qw( lib/Squirrel.pod ) ],
6510 ' lib/Squirrel.pod' );
0 commit comments