Perl CPAN module object method not found error -


i trying use cpan module: math::vector::real::neighbors

i see following error message:

can't locate object method "box" via package "math::vector::real" @ /usr/local/share/perl/5.14.2/math/vector/real/neighbors.pm line 12.

so, go package , see this: my ($bottom, $top) = math::vector::real->box(@_);

next, go real.pm package at: /usr/local/share/perl/5.14.2/math/vector/real.pm

i see box sub routine exist in it: sub box {...

any idea why error might cropping up?

you need add use math::vector::real top of script math::vector::real::neighbors work. following code runs expected:

use strict; use warnings;  use math::vector::real; use math::vector::real::neighbors; use math::vector::real::random;  @v = map math::vector::real->random_normal(2), 0..1000; @nearest_ixs = math::vector::real::neighbors->neighbors(@v); 

but note did not work without line use math::vector::real.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -