in reply to Re^2: PM module question/improvements
in thread PM module question/improvements
at C:\Users\Lucca\Documents\NetBeansProjects\PERL scripts\perl\MioDreamcar.pl line 17. is telling you the line and file where the error occured; in this case the error occurred when you tried to LOAD Da_corsa.
The error message Can't locate object method "class" via package "Da_corsa" (perhaps you forgot to load "Da_corsa"?) is telling you that Perl still can't find a valid package of that name. The reason is probably that you are forgetting to return a true value at the end of your package, i.e. your module Da_corsa.pm should be like:
In your original post the other two packages return true but Da_corsa doesn't.package Da_corsa; use strict; use warnings; sub foo { return 'bar'; } 1; # return true
Given the various comments and such in your latest example, once your module returns true, you might have success with:
use lib "C:/Users/Lucca/Documents/NetBeansProjects/perlpm"; use Da_corsa;
Hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: PM module question/improvements
by Anonymous Monk on Nov 07, 2015 at 03:26 UTC | |
|
Re^4: PM module question/improvements
by perlynewby (Scribe) on Nov 07, 2015 at 04:05 UTC |