diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-10-16 13:02:19 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2005-10-16 13:02:19 +0000 |
commit | fb59f973f6f88348284bb8f14a993e802c8f35d7 (patch) | |
tree | 2fd30210b3fa5b12ff29bd29983057650931b90f /lib | |
parent | 27856418c89336f06fb37ea6a58a1a69e1e2a27c (diff) | |
download | perl-fb59f973f6f88348284bb8f14a993e802c8f35d7.tar.gz |
Upgrade to Pod-Parser-1.34 (with some changes to get the new test file
to work within the core).
p4raw-id: //depot/perl@25765
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Pod/Find.pm | 6 | ||||
-rw-r--r-- | lib/Pod/t/contains_pod.t | 25 |
2 files changed, 28 insertions, 3 deletions
diff --git a/lib/Pod/Find.pm b/lib/Pod/Find.pm index 7911a55cf5..0b085b8c9e 100644 --- a/lib/Pod/Find.pm +++ b/lib/Pod/Find.pm @@ -13,7 +13,7 @@ package Pod::Find; use vars qw($VERSION); -$VERSION = 1.30; ## Current version of this package +$VERSION = 1.34; ## Current version of this package require 5.005; ## requires this Perl version or later use Carp; @@ -251,7 +251,7 @@ sub _check_and_extract_name { # check extension or executable flag # this involves testing the .bat extension on Win32! - unless(-f $file && -T _ && ($file =~ /\.(pod|pm|plx?)\z/i || -x _ )) { + unless(-f $file && -T $file && ($file =~ /\.(pod|pm|plx?)\z/i || -x $file )) { return undef; } @@ -494,7 +494,7 @@ sub contains_pod { local $/ = undef; my $pod = <POD>; close(POD) || die "Error closing $file: $!\n"; - unless($pod =~ /\n=(head\d|pod|over|item)\b/s) { + unless($pod =~ /^=(head\d|pod|over|item)\b/m) { warn "No POD in $file, skipping.\n" if($verbose); return 0; diff --git a/lib/Pod/t/contains_pod.t b/lib/Pod/t/contains_pod.t new file mode 100644 index 0000000000..9ebe665074 --- /dev/null +++ b/lib/Pod/t/contains_pod.t @@ -0,0 +1,25 @@ +#!/usr/bin/env perl + +# Copyright (C) 2005 Joshua Hoblitt +# +# $Id$ + +use strict; + +BEGIN { + if( $ENV{PERL_CORE} ) { + chdir 't'; + @INC = '../lib'; + } else { + use lib qw( ./lib ); + } +} + + +use Test::More tests => 1; + +use Pod::Find qw( contains_pod ); + +{ + ok(contains_pod('lib/contains_pod.xr'), "contains pod"); +} |