Non-Existent Packages

Ovid on 2009-03-30T21:37:50

This line of code:

my $employee = Employee::Hourly->new;

Has generated this error message:

Can't locate object method "new" via package "" at ...

Of course, given what I'm trying to do, it makes perfect sense. Strange, strange code.


Constants...

jjore on 2009-03-31T05:29:40

Does Employee::Hourly::->new work better? I've never actually needed to do this but I've wondered who might actually run into this in practice.

Re:Constants...

Ovid on 2009-03-31T08:49:15

No. I'm familiar with the bug you're referring to, but this was actually caused by my programmatic enforcement of Liskov. It's very strange code and I had a terrible bug in it. (there are still terrible bugs in it, but it works)