Skip Menu |

This queue is for tickets about the Test-Parser CPAN distribution.

Report information
The Basics
Id: 33620
Status: resolved
Priority: 0/
Queue: Test-Parser

People
Owner: Nobody in particular
Requestors: grousse [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.6
Fixed in: 1.7



Subject: Broken object type
The constructor of Test::Parser object uses an arrayref reference for implementing the object. However, it uses hashref syntax to access its content, preventing object usage (I wonder how you guys tested it before releasing): Not a HASH reference at /home/guillomovitch/tmp/hPOloBra1N/BUILD/Test-Parser-1.6/blib/lib/Test/Parser.pm line 100. Attached patch fixes this issue by using an hashref to implement the object.
Subject: Test-Parser-1.6-fix-object-type.patch
diff -Naur Test-Parser-1.6/lib/Test/Parser.pm Test-Parser-1.6-fix-object-type/lib/Test/Parser.pm --- Test-Parser-1.6/lib/Test/Parser.pm 2008-02-26 19:24:05.000000000 +0100 +++ Test-Parser-1.6-fix-object-type/lib/Test/Parser.pm 2008-02-27 11:58:57.000000000 +0100 @@ -95,7 +95,7 @@ sub new { my $this = shift; my $class = ref($this) || $this; - my $self = bless [\%FIELDS], $class; + my $self = bless {%FIELDS}, $class; $self->{path} = 0; $self->{units} = $class;
On Wed Feb 27 07:33:05 2008, GROUSSE wrote: Show quoted text
> The constructor of Test::Parser object uses an arrayref reference for > implementing the object. However, it uses hashref syntax to access its > content, preventing object usage (I wonder how you guys tested it > before > releasing):
Sorry, Perl isn't my strong point. Bryce had only now given me access to updating the cpan modules so I can finally update modules of mine that I have known were broken. I appreciate the help a lot though and will get your patch applied shortly. Regards, Mark