Commit | Line | Data |
d80786d0 |
1 | #!/usr/bin/env perl |
2 | |
3 | use strict; |
4 | use warnings FATAL => 'all'; |
5 | |
6 | my $from = do { local (@ARGV, $/) = ('lib/HTML/Zoom.pm'); <> }; |
7 | |
8 | $from =~ s/.*^=head1 SYNOPSIS\n//sm; |
9 | |
10 | $from =~ s/^=head1.*//sm; |
11 | |
12 | my $code = join "\n", map { s/^ // ? ($_) : () } split "\n", $from; |
13 | |
14 | open my $syn_test, '>', 't/synopsis.t' |
15 | or die "Couldn't open t/synopsis.t - you screwed something up. Go fix it.\n"; |
16 | |
17 | print $syn_test "use strict; |
18 | use warnings FATAL => 'all'; |
19 | use Test::More qw(no_plan); |
20 | |
21 | $code; |
22 | "; |