in reply to Package mismatch

You create $point1 and $point2, but you use $point. That could be a cut-and-paste error, but it also may be the culprit.

And in general, you're better off using the

Package::Foo->new()
syntax instead of the indirect object method.

Replies are listed 'Best First'.
Re^2: Package mismatch
by Anonymous Monk on Dec 29, 2010 at 18:13 UTC
    Thanks! If my perl file contains only:
    use Geography::NationalGrid::IE;
    I still get the error. Any ideas.
      I downloaded the package, read the manual page, and saw the manual page uses:
      use Geography::NationalGrid;
      So, I tried:
      $ perl -MGeography::NationalGrid::IE -we1 Can't locate object method "deg2rad" via package "Geography::NationalG +rid" at /opt/perl/lib/site_perl/5.12.2/Geography/NationalGrid/IE.pm l +ine 7. BEGIN failed--compilation aborted at /opt/perl/lib/site_perl/5.12.2/Ge +ography/NationalGrid/IE.pm line 7. Compilation failed in require. BEGIN failed--compilation aborted. $ $ perl -MGeography::NationalGrid -we1 $