Can't locate object method "new" via package "A::B
时间:2010-01-19 来源:cjc921
I'm getting the following error:
Software error:
Can't locate object method "new" via package "A::B" at /path/file.cgi line 5.
My code is basically this:
Software error:
Can't locate object method "new" via package "A::B" at /path/file.cgi line 5.
My code is basically this:
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl -w
- use strict;
- use warnings;
- use A::B;
- my $test = new A::B;
Expand|Select|Wrap|Line Numbers
I realize I'm not giving a lot of information here, but I don't know what else to specify except I'm on Mac OS X Leopard. I would really appreciate any help. If you need any other information, please ask for what you need to know.
Thank you!
- package A::B;
- use strict;
- use warnings;
- sub new {
- print "Content-type: text/html\n\nHello World!";
- }
- 1;
I realize I'm not giving a lot of information here, but I don't know what else to specify except I'm on Mac OS X Leopard. I would really appreciate any help. If you need any other information, please ask for what you need to know.
Thank you!
相关阅读 更多 +