Skip Menu |

This queue is for tickets about the Symbol-Approx-Sub CPAN distribution.

Report information
The Basics
Id: 36588
Status: resolved
Priority: 0/
Queue: Symbol-Approx-Sub

People
Owner: DAVECROSS [...] cpan.org
Requestors: pne [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 2.02
  • 2.03
  • 2.04
  • 2.06
Fixed in: (no value)



Subject: Typos in documentation
There seem to be a couple of errors in the documentation of Symbol::Approx::Sub, such as talking about an 'xfrom' parameter (rather than 'xform') which takes values such as 'text_metaphone' (rather than 'Text::Metaphone'). While I was at it, I also added a couple of apostrophes and commas which I felt belonged in there. Please see the attached patch. I did not change the tests.
Subject: sas.patch
diff -ruN Symbol-Approx-Sub-2.06.orig/README Symbol-Approx-Sub-2.06/README --- Symbol-Approx-Sub-2.06.orig/README 2008-03-06 21:35:40.000000000 +0100 +++ Symbol-Approx-Sub-2.06/README 2008-06-09 15:43:46.250000000 +0200 @@ -43,7 +43,7 @@ PREREQUISITES - As of version 1.03, Symbol::Approx::Sub uses Devel::Symdump to do all of + As of version 1.03, Symbol::Approx::Sub uses Devel::Symdump to do all of the clever glob-walking stuff, so you'll need to get that from CPAN and install it before installing Symbol::Approx::Sub. @@ -55,7 +55,6 @@ perldoc Symbol::Approx::Sub - at a comand prompt. LATEST VERSION diff -ruN Symbol-Approx-Sub-2.06.orig/lib/Symbol/Approx/Sub.pm Symbol-Approx-Sub-2.06/lib/Symbol/Approx/Sub.pm --- Symbol-Approx-Sub-2.06.orig/lib/Symbol/Approx/Sub.pm 2008-03-06 21:35:40.000000000 +0100 +++ Symbol-Approx-Sub-2.06/lib/Symbol/Approx/Sub.pm 2008-06-09 15:42:18.578125000 +0200 @@ -36,20 +36,20 @@ use Symbol::Approx::Sub; -somewhere in your program. Then each time you call a subroutine that doesn't -exist in the the current package Perl will search for a subroutine with +somewhere in your program. Then, each time you call a subroutine that doesn't +exist in the the current package, Perl will search for a subroutine with approximately the same name. The meaning of 'approximately the same' is configurable. The default is to find subroutines with the same Soundex value (as defined by Text::Soundex) as the missing subroutine. There are -two other built-in matching styles using Text::MetaPhone and +two other built-in matching styles using Text::Metaphone and String::Approx. To use either of these use: - use Symbol::Approx::Sub (xform => 'text_metaphone'); + use Symbol::Approx::Sub (xform => 'Text::Metaphone'); or - use Symbol::Approx::Sub (xfrom => undef, - match => 'string_approx'); + use Symbol::Approx::Sub (xform => undef, + match => 'String::Approx'); when using Symbol::Approx::Sub. @@ -62,7 +62,7 @@ =item * B<transform> - a transform subroutine applies some kind of transformation -to the subroutine names. For example the default transformer applies the +to the subroutine names. For example, the default transformer applies the Soundex algorithm to each of the subroutine names. Other obvious tranformations would be to remove all the underscores or to change the names to lower case. @@ -82,7 +82,7 @@ B<match> - a match subroutine takes a target string and a list of other strings. It matches each of the strings against the target and determines -whether or not it 'matches' according to some criteria. For example the +whether or not it 'matches' according to some criteria. For example, the default matcher simply checks to see if the strings are equal. A match subroutine is passed the target string as its first parameter, @@ -125,18 +125,18 @@ To use your own function, simply pass a reference to the subroutine to the C<use Symbol::Approx::Sub> line like this: - use Symbol::Approx::Sub(xfrom => \&my_transform, + use Symbol::Approx::Sub(xform => \&my_transform, match => \&my_matcher, choose => \&my_chooser); A plug-in is simply a module that lives in the Symbol::Approx::Sub namespace. For example, if you had a line of code like this: - use Symbol::Approx::Sub(xfrom => 'MyTransform'); + use Symbol::Approx::Sub(xform => 'MyTransform'); then Symbol::Approx::Sub will try to load a module called -Symbol::Approx::Sub::MyTranform and it will use a function from within that -module called C<tranformer> as the transform function. Similarly, the +Symbol::Approx::Sub::MyTransform and it will use a function from within that +module called C<transform> as the transform function. Similarly, the matcher function is called C<match> and the chooser function is called C<choose>. @@ -170,7 +170,7 @@ } # import is called when another script uses this module. -# All we do here is overwrite the callers AUTOLOAD subroutine +# All we do here is overwrite the caller's AUTOLOAD subroutine # with our own. =head1 Subroutines @@ -307,7 +307,7 @@ # Create a subroutine which is called when a given subroutine # name can't be found in the current package. In the import subroutine -# above we have already arranged that our calling package will use +# above, we have already arranged that our calling package will use # the AUTOLOAD created here instead of its own. sub _make_AUTOLOAD { my %CONF = @_; @@ -382,8 +382,8 @@ =head1 ACKNOWLEDGEMENTS This idea came to me whilst sitting in Mark-Jason Dominus' "Tricks of -the Wizards" tutorial. In order to protect his reputation I should -probably point out that just as the idea was forming in my head he +the Wizards" tutorial. In order to protect his reputation, I should +probably point out that just as the idea was forming in my head, he clearly said that this kind of thing was a very bad idea. Leon Brocard is clearly as mad as me as he pointed out some important bugs
I'm sure you're just doing it to force me into making a new release following the discussion on the london.pm mailing list this morning :) Anyway, thanks. I'll apply the patch and get the fix out in the next few days. Cheers, Dave...
Subject: Re: [rt.cpan.org #36588] Typos in documentation
Date: Tue, 10 Jun 2008 09:25:51 +0200
To: bug-Symbol-Approx-Sub [...] rt.cpan.org
From: "Philip Newton" <pne [...] cpan.org>
On Mon, Jun 9, 2008 at 16:06, DAVECROSS via RT <bug-Symbol-Approx-Sub@rt.cpan.org> wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=36588 > > > I'm sure you're just doing it to force me into making a new release > following the discussion on the london.pm mailing list this morning :)
Something like that :) Well, not specifically. I just was reminded of the module when it was mentioned and so I had a look at the docs. Then I wondered whether the parameters mentioned in the docs would work and checked the source and thought it was unlikely, so I made a little patch. I did see that you hadn't touched it for several years before the three releases this March, so you can still claim that if the crowd need some consolation of your sanity. Cheers, Philip
Fixed in release 2.07. Dave...