Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: OO method wont parse

by toolic (Bishop)
on Aug 28, 2017 at 20:27 UTC ( [id://1198205]=note: print w/replies, xml ) Need Help??


in reply to OO method wont parse

The errors disappear for me when I use all lower-case for the "sub" keyword (not "Sub") and when I declare your variables with my in the RowCount sub:
sub Fetch { my $class = shift; my $sql = $class->{SQL}; #return $sql->fetchrow_array(); } sub RowCount { my $class = shift; my $sql = $class->{SQL}; return $sql->rows; }

My text editor with syntax highlighting clearly showed the Sub as not being a keyword.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-24 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found