"new" via package
Date::Range
package Date::Range;
my $range = Date::Range -> new ($date1, $date2);
This code creates a package called Date::Range rather than importing it.
I am assuming you should do something like:
use Date::Range;
my $range = Date::Range->new($date1, $date
s:
>
> can't locate object method "new" via package
> Date::Range
>
> package Date::Range;
This should be "use Date::Range". (I'm assuming you've also installed
Date::Range from CPAN. If you haven't, do that too).
The "package" state
Hi all,
This is part of a perl program I wrote that doesn't
compile. I am trying to get my database to search by
date- to have current and past events come up.
Anyway, based on the following code, I get an error
message that reads:
can't locate object method "new" via