Skip Menu |

This queue is for tickets about the CGI-Expand CPAN distribution.

Report information
The Basics
Id: 56170
Status: resolved
Priority: 0/
Queue: CGI-Expand

People
Owner: perl-cpan [...] bereft.net
Requestors: MJD [...] cpan.org
Cc: rjbs [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.02
Fixed in: (no value)



% perl -MCGI::Expand= -le 'print CGI::Expand::expand_hash({ "a.0" => 77 })' Can't call method "separator" on unblessed reference at /usr/pkg/lib/perl5/site_perl/5.8.0/CGI/Expand.pm line 100. That's the example from the manual.
On 2010-03-31 13:35:34, MJD wrote: Show quoted text
> % perl -MCGI::Expand= -le 'print CGI::Expand::expand_hash({ "a.0" => 77 })' > > Can't call method "separator" on unblessed reference at > /usr/pkg/lib/perl5/site_perl/5.8.0/CGI/Expand.pm line 100. > > That's the example from the manual.
The problem is that the documentation is insufficiently clear about the fact that the expand_* methods must be imported to work. They should be documented as methods, with the curried exports explained separately, to dissolve expectations that the routines can be called directly. If you have a git repo somewhere I can send you commits. I think this could also be easily tweaked to allow subclassing-free special separators, etc. -- rjbs
On Wed Mar 31 13:55:46 2010, RJBS wrote: Show quoted text
> On 2010-03-31 13:35:34, MJD wrote:
> > % perl -MCGI::Expand= -le 'print CGI::Expand::expand_hash({ "a.0" =>
> 77 })'
> > > > Can't call method "separator" on unblessed reference at > > /usr/pkg/lib/perl5/site_perl/5.8.0/CGI/Expand.pm line 100. > > > > That's the example from the manual.
Thanks for the report. I must have broken the example during the 1.03 to 2.* transition. Show quoted text
> The problem is that the documentation is insufficiently clear about > the fact that the expand_* > methods must be imported to work. They should be documented as > methods, with the > curried exports explained separately, to dissolve expectations that > the routines can be called > directly. > > If you have a git repo somewhere I can send you commits. I think this > could also be easily > tweaked to allow subclassing-free special separators, etc.
I've been intending to put my modules on github for a while now. I'll do so this week and let you know the url. Thanks for the help, Brad
On Wed Mar 31 13:55:46 2010, RJBS wrote: Show quoted text
> On 2010-03-31 13:35:34, MJD wrote:
> > % perl -MCGI::Expand= -le 'print CGI::Expand::expand_hash({ "a.0" =>
> 77 })'
> > > > Can't call method "separator" on unblessed reference at > > /usr/pkg/lib/perl5/site_perl/5.8.0/CGI/Expand.pm line 100. > > > > That's the example from the manual.
> > The problem is that the documentation is insufficiently clear about > the fact that the expand_* > methods must be imported to work. They should be documented as > methods, with the > curried exports explained separately, to dissolve expectations that > the routines can be called > directly. > > If you have a git repo somewhere I can send you commits. > I think this could also be easily > tweaked to allow subclassing-free special separators, etc.
Sorry for the delay, RSI. I have setup a github repo for CGI::Expand and would appreciate a patch (Ricardo): http://github.com/bowman/CGI-Expand Thanks, Brad Bowman
Shockingly, I have also finally gotten back to this: https://github.com/rjbs/CGI-Expand I've clarified the method / function thing a bit and tweaked the use of C<> blocks in =item, which had made it hard to link to specific items with L<>. -- rjbs
RJBS's patch applied and released as 2.03. Thank you both.