Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: writing an api wrapper I get a 1 with my return value from method

by kennethk (Monsignor)
on Jan 15, 2013 at 15:15 UTC ( #1013409=note: print w/ replies, xml ) Need Help??


in reply to writing an api wrapper I get a 1 with my return value from method

The last statement in your getAll routine is print "All Answers";. A subroutine returns without explicit return "automatically returns the value of the last expression evaluated." print "[r]eturns true if successful", so getAll returns 1.


#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.


Comment on Re: writing an api wrapper I get a 1 with my return value from method
Select or Download Code
Re^2: writing an api wrapper I get a 1 with my return value from method
by gideondsouza (Pilgrim) on Jan 15, 2013 at 15:21 UTC

    Ah man! I had a feeling it was something silly :( I'm a little embarrassed

    Oh well, you live and learn!

    Thanks very much for you reply kennethk

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-12-29 09:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls