Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Trouble getting size of list returned from sub

by Don Coyote (Pilgrim)
on Nov 26, 2012 at 13:41 UTC ( #1005660=note: print w/ replies, xml ) Need Help??


in reply to Trouble getting size of list returned from sub

Could adding an evaluation to the end of the sub something like;

sub gettinglist{ $ListItemReturnedCount++ if { Item retrieved }; return $ListItemReturnedCount; }

be a possible alternative? Ok, perhaps if you are debugging but not for production as a very unexpectedly short list would be returned to a calling routine somewhere. So, seeing as the sub is returning a list anyway. Could you not retrieve the number from some other place, for example from the sub/routine to where the list is called from?


Comment on Re: Trouble getting size of list returned from sub
Download Code
Replies are listed 'Best First'.
Re^2: Trouble getting size of list returned from sub
by ColonelPanic (Friar) on Nov 26, 2012 at 14:11 UTC
    Of course this could be easily solved if one can edit the subroutine. However, as the poster noted, it's someone else's code and an XS sub, not a Perl sub.


    When's the last time you used duct tape on a duct? --Larry Wall

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2015-07-29 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls