Skip Menu |

This queue is for tickets about the txt2html CPAN distribution.

Report information
The Basics
Id: 38670
Status: open
Priority: 0/
Queue: txt2html

People
Owner: Nobody in particular
Requestors: Dave [...] WolfeWorks.net
Cc:
AdminCc:

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



Subject: default_link_dict broken in 2.51
Date: Fri, 22 Aug 2008 15:12:28 -0500
To: bug-txt2html [...] rt.cpan.org
From: Dave Wolfe <Dave [...] WolfeWorks.net>
Distribution: txt2html-2.51 Perl: v5.8.8 built for x86_64-linux-gnu-thread-multi Ubuntu Linux: Linux version 2.6.24-19-generic (buildd@king) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Fri Jul 11 21:01:46 UTC 2008 Specifying my own link dictionary works in 2.46 but not in 2.51. This is due to changes in 2.51 (2.50?) which removed the deprecated reference- to-an-array usage in the args method. Method do_init_call still uses the removed feature and, as a result, attempts to set default_link_dict becomes a nop (see line 5294 in TextToHTML.pm): 5294 $self->args(['--links_dictionaries', $ld]); Ideally, the initial code in the args method would check for an odd number of arguments before assigning the arguments to a hash and at least warn the user that something is wrong, e.g.: sub args { my $self = shift; + if (@_ % 2) { + my ($pkg, $fn, $line) = caller; + die "Method 'args' called with odd number of arguments by " . + "$pkg::$fn at line $line\n"; + } my %args = @_; -- Dave Wolfe
Subject: Re: [rt.cpan.org #38670] default_link_dict broken in 2.51
Date: Sat, 23 Aug 2008 08:17:19 +1000
To: Dave Wolfe via RT <bug-txt2html [...] rt.cpan.org>
From: Kathryn Andersen <perlkat [...] katspace.org>
On Fri, Aug 22, 2008 at 04:23:08PM -0400, Dave Wolfe via RT wrote: Show quoted text
> Specifying my own link dictionary works in 2.46 but not in 2.51. This is > due to changes in 2.51 (2.50?) which removed the deprecated reference- > to-an-array usage in the args method. Method do_init_call still uses the > removed feature and, as a result, attempts to set default_link_dict > becomes a nop (see line 5294 in TextToHTML.pm): > > 5294 $self->args(['--links_dictionaries', $ld]); > > Ideally, the initial code in the args method would check for an odd > number of arguments before assigning the arguments to a hash and at > least warn the user that something is wrong, e.g.: > > sub args > { > my $self = shift; > + if (@_ % 2) { > + my ($pkg, $fn, $line) = caller; > + die "Method 'args' called with odd number of arguments by " . > + "$pkg::$fn at line $line\n"; > + } > my %args = @_;
Thanks for bringing this to my attention! And thanks for the patch! Kathryn Andersen -- _--_|\ | Kathryn Andersen <http://www.katspace.org> / \ | \_.--.*/ | GenFicCrit mailing list <http://www.katspace.org/gen_fic_crit/> v | -----------| Melbourne -> Victoria -> Australia -> Southern Hemisphere Maranatha! | -> Earth -> Sol -> Milky Way Galaxy -> Universe