Skip Menu |

This queue is for tickets about the Data-Path CPAN distribution.

Report information
The Basics
Id: 32911
Status: resolved
Priority: 0/
Queue: Data-Path

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

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



Subject: Can't call methods in deeply embedded objects
It seems that the Data::Path notation using method calls are only possible if the method call is on top of the path declaration. Consider the following example: #!/usr/bin/perl use strict; use Data::Path; { package Foo; sub new { bless {}, shift } sub bar { "bar" } } { my $data = Foo->new; my $dp = Data::Path->new($data); warn $dp->get("/bar()"); # works } { my $data = { foo => Foo->new }; my $dp = Data::Path->new($data); warn $dp->get("/foo"); warn $dp->get("/foo/bar()"); # does not work } __END__ The first block works fine, but in the second block I get a "trie to retrieve a key from a no hash value (in key foo)" error. Regards, Slaven
fixed in version 1.2