Forgot that : package Base::Simple; use parent qw(Base); use PDL; ... 1; Oooo... I see "set" is PDL::Core method !!! and for some reason probably they collide when I inherit ... any workaround ?
On Mon, Sep 30, 2013 at 9:53 PM, mraptor <[email protected]> wrote: > The funny thing is that if I do : > > > my $tmp = zeros 20; > my $s = $self->{base_simple_obj}; > bless $s, 'Base'; > $s->set('blah', $tmp); > > it works too.. > > PS> sorry about replying.. google-groups always reply to one, rather than > to all.. > > > On Mon, Sep 30, 2013 at 11:58 AM, Craig DeForest < > [email protected]> wrote: > >> I agree with Chris here -- we can't really help without knowing what made >> the error happen. That specific error happens because PDL has some >> DWIMmery going on with hash refs. Most PDL utilities (anything written in >> the PP metalanguage, which is most of the stuff supplied with the >> distribution) will let you pass in a hash ref with a field named "PDL", >> anywhere the utility expects a normal PDL variable. That's handy in case >> you want to subclass PDL and carry some ancillary data around with each >> object. (You can also do that using the hdr() mechanism, which lets you >> attach a hash ref of metadata to a normal PDL). >> >> So if you feed a hash ref into a utility routine that expects a PDL, if >> there's a "PDL" field it will silently work. If there's no "PDL" field in >> the hash, you get that error message. >> >> >> On Sep 30, 2013, at 4:21 AM, Chris Marshall <[email protected]> >> wrote: >> >> > You'll have to show your code. Otherwise the error >> > message means "you've done something wrong". >> > >> > --Chris >> > >> > On Sun, Sep 29, 2013 at 10:59 PM, mraptor <[email protected]> wrote: >> >> Hash given as a pdl - but not {PDL} key! at Basic/Core/Core.pm.PL(i.e. >> >> PDL::Core.pm) line 3247, <DATA> line 90. >> >> >> >> >> >> >> >> _______________________________________________ >> >> Perldl mailing list >> >> [email protected] >> >> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> >> >> > >> > _______________________________________________ >> > Perldl mailing list >> > [email protected] >> > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl >> > >> >> >
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
