Sinister has asked for the wisdom of the Perl Monks concerning the following question:
Now when I call in a perl script this new method like this:package Voice::Calender; use strict; use base qw(Voice); sub new { my ( $invocant, @jada ) = @_; my $class = ref($invocant) || $invocant; my $obj = { }; bless $obj, $class; }
I keep on getting this error: Can't call method "new" without a package or object reference at /www/voice/docs/cgi/calendar.cgi line 45, <PIPE> line 8 What could be my problem here?use strict; use Voice::Calendar; my $voice = Voice::Calendar->new();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with calling method new
by chromatic (Archbishop) on Sep 21, 2001 at 02:01 UTC | |
|
Re: Problem with calling method new
by jlongino (Parson) on Sep 21, 2001 at 02:04 UTC | |
by Sinister (Friar) on Sep 21, 2001 at 02:17 UTC | |
by jlongino (Parson) on Sep 21, 2001 at 02:31 UTC | |
|
Re: Problem with calling method new
by converter (Priest) on Sep 21, 2001 at 07:44 UTC | |
by Sinister (Friar) on Sep 21, 2001 at 12:29 UTC | |
|
Re: Problem with calling method new
by dragonchild (Archbishop) on Sep 21, 2001 at 02:01 UTC | |
|
Re: Problem with calling method new
by perrin (Chancellor) on Sep 21, 2001 at 02:07 UTC | |
|
Re: Problem with calling method new
by Sweeper (Pilgrim) on Sep 21, 2001 at 09:26 UTC | |
by davorg (Chancellor) on Sep 21, 2001 at 14:10 UTC | |
|
Re: Problem with calling method new
by mitd (Curate) on Sep 21, 2001 at 05:13 UTC |