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;