[Bps-public-commit] Test-Spelling branch, master, updated. 0.14-2-ga2deec7

Thomas Sibley trs at bestpractical.com
Fri Dec 14 19:48:53 EST 2012


The branch, master has been updated
       via  a2deec79ef780212c1260ecae973d5d7e233ee48 (commit)
       via  fcbd40869ce8d12f72e1cd3eeb7b563bc2a0629c (commit)
      from  9622f8047bbe2a46e125c083b1e6b46f21c36740 (commit)

Summary of changes:
 Changes              |  3 +++
 lib/Test/Spelling.pm | 18 +++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit fcbd40869ce8d12f72e1cd3eeb7b563bc2a0629c
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Dec 14 15:41:37 2012 -0800

    Allow the use of different POD parsers instead of Pod::Spell

diff --git a/lib/Test/Spelling.pm b/lib/Test/Spelling.pm
index d6f791e..f73c574 100644
--- a/lib/Test/Spelling.pm
+++ b/lib/Test/Spelling.pm
@@ -20,12 +20,14 @@ our @EXPORT = qw(
     all_pod_files
     set_pod_file_filter
     has_working_spellchecker
+    set_pod_parser
 );
 
 my $TEST = Test::Builder->new;
 
 my $SPELLCHECKER;
 my $FILE_FILTER = sub { 1 };
+my $POD_PARSER  = Pod::Spell->new;
 
 sub spellchecker_candidates {
     # if they've specified a spellchecker, use only that one
@@ -112,8 +114,7 @@ sub invalid_words_in {
     open my $handle, '>', \$document;
 
     # save digested POD to the string $document
-    my $checker = Pod::Spell->new;
-    $checker->parse_from_file($file, $handle);
+    $POD_PARSER->parse_from_file($file, $handle);
 
     my @words = _get_spellcheck_results($document);
 
@@ -238,6 +239,10 @@ sub set_pod_file_filter {
     $FILE_FILTER = shift;
 }
 
+sub set_pod_parser {
+    $POD_PARSER = shift;
+}
+
 1;
 
 __END__
@@ -395,6 +400,13 @@ L</all_pod_files_spelling_ok>).
         return 1;
     });
 
+=head2 set_pod_parser($object)
+
+By default L<Pod::Spell> is used to generate text suitable for spellchecking
+from the input POD.  If you want to use a different parser, perhaps a
+customized subclass of L<Pod::Spell>, call C<set_pod_parser> with an object
+that isa L<Pod::Parser>.
+
 =head1 SEE ALSO
 
 L<Pod::Spell>

commit a2deec79ef780212c1260ecae973d5d7e233ee48
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Dec 14 15:41:41 2012 -0800

    Bump version

diff --git a/Changes b/Changes
index d7c6ac9..ca54d75 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Test-Spelling
 
+0.15  2012-12-14
+        - Allow for the use of different POD parsers instead of Pod::Spell
+
 0.14  2011-05-27
         - Fix an error when using add_stopwords("constant", "strings")
           [rt.cpan.org #68471] (reported by Nicholas Bamber)
diff --git a/lib/Test/Spelling.pm b/lib/Test/Spelling.pm
index f73c574..700c2f2 100644
--- a/lib/Test/Spelling.pm
+++ b/lib/Test/Spelling.pm
@@ -10,7 +10,7 @@ use File::Spec;
 use IPC::Open3;
 use Symbol 'gensym';
 
-our $VERSION = '0.14';
+our $VERSION = '0.15';
 
 our @EXPORT = qw(
     pod_file_spelling_ok

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list