Thanks for the input everyone. The @EXPORT was a desparate attempt to fix the problem. I should have taken it back out. Here are the complete program and module in a more minimalist form.

Here is syringe.pl

#!/usr/local/ActivePerl-5.10/bin/perl -w use strict; use warnings; use Syringe; print $INC{"Syringe.pm"}; my $syringe = Syringe->new(); print "Wohooooo!";

and here is syringe.pm, which is in the same directory.

#Package Syringe package Syringe; use strict; use warnings; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw(); use constant PI => 4 * atan2 1, 1; sub new { my $class = shift; my $self = {}; bless $self, $class; $self->{picture_width} = $args{picture_width}; return $self; } 1;

When I run it, I get the following results. The "use lib" line is not strictly necessary, but it forces the full module path to be printed, which assures me that there isn't some other Syringe.pm that I'm loading. The result is essentially the same as before. I'd be tempted to blame some misconfiguration in the Komodo environment, but I have other module/program pairs that I can run without problems.

Can't locate object method "new" via package "Syringe" (perhaps you fo +rgot to load "Syringe"?) at /Users/phowell/Documents/Work/Programming +/Syringe/Syringe.pl line 8. /Users/phowell/Documents/Work/Programming/Syringe/Syringe.pm

In reply to Re: Can't locate object method "new" via package ... perhaps you forgot to load...Oh yes I did! by Phemto
in thread Can't locate object method "new" via package ... perhaps you forgot to load...Oh yes I did! by Phemto

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.