Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Stuck on packages

by mreece (Friar)
on Jan 04, 2007 at 06:38 UTC ( #592889=note: print w/replies, xml ) Need Help??


in reply to Stuck on packages

package Vehicle; sub new { my $class = @_; ...
try my $class = shift; or my ($class) = @_;, but the above is assigning the 'length' of @_ (probably 1) to $class, so your objects aren't being properly blessed.

(there are other problems with the code, see other responses, don't expect this comment to solve everything)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://592889]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2021-03-01 22:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (27 votes). Check out past polls.

    Notices?