CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [ChopperCharles] private and protected methods: Edit Log



budman
User

Mar 29, 2012, 9:47 AM


Views: 9739
Re: [ChopperCharles] private and protected methods

 
Test your return values in test1.pl

Success is 0, Fail is -1 - you were checking ret_code == 0


Code
$ret_code = $t->__foo("Charles"); 
print "RC: $ret_code\n";
if ($ret_code != 0) { print "t->__foo(\"Charles\") failed.\n"; }


Correct the " my $type = @_ " was actually getting the number of args and then using that number to bless the hash with. Changing it to " my ($type) = @_; " was correct.

That should work for you now.

What was the error for base and parent?

Did you use it as follows:

Code
use parent 'fooBar';


What version of perl are you using?


(This post was edited by budman on Mar 29, 2012, 9:54 AM)


Edit Log:
Post edited by budman (User) on Mar 29, 2012, 9:48 AM
Post edited by budman (User) on Mar 29, 2012, 9:49 AM
Post edited by budman (User) on Mar 29, 2012, 9:54 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives