This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Strip whitespace from the beginning of static_ext:
[perl5.git] / t / pod / twice.t
1 use strict;
2 use Test;
3 use File::Spec;
4
5 BEGIN { plan tests => 1 }
6
7 use Pod::Parser;
8 use Carp;
9 $SIG{__DIE__} = \&Carp::confess;
10
11 eval {require IO::String;};
12 skip($@ ? 'no IO::String' : '', sub {
13   {
14     my $pod_string = 'some I<silly> text';
15     my $handle = IO::String->new( \$pod_string );
16     my $parser = Pod::Parser->new();
17     $parser->parse_from_file( $0, $handle );
18   }
19   # free the reference
20   {
21     my $parser = Pod::Parser->new();
22     $parser->parse_from_file( $0, File::Spec->devnull );
23   }
24   1;
25 });
26
27 exit 0;
28
29 __END__
30
31 =head1 EXAMPLE
32
33 This test makes sure the parse_from_file is re-entrant
34
35 =cut
36