Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: SmallTalk-like Message browser

by rhesa (Vicar)
on Jul 05, 2007 at 12:26 UTC ( #625035=note: print w/ replies, xml ) Need Help??


in reply to Re: SmallTalk-like Message browser
in thread SmallTalk-like Message browser

The output roughly means the following:

--- <filename>: <subname>: called from: <filename>:<subname>: <this many times>
The reason you're seeing odd results is a limitation of static analysis. If you have two packages with identically named methods, then their usage gets lumped together. That is, One->new and Two->new are grouped, and count as two calls to new.

# file Classone.pm package Classone; sub new { } 1; # file Classtwo.pm package Classtwo; sub new { } sub a_method { Classone->new; Classtwo->new; } 1;
Those two files result in:
Classone.pm: new: Classtwo.pm:a_method: 2 Classtwo.pm: a_method: {} new: Classtwo.pm:a_method: 2

I don't think you can get meaningful results unless you have an interactive environment -- like Squeak -- that can track the class of the invocant. Still, this is a nice approximation. As long as you keep the limitations in mind, it can be quite useful.


Comment on Re^2: SmallTalk-like Message browser
Select or Download Code
Re^3: SmallTalk-like Message browser
by jdporter (Canon) on Jul 05, 2007 at 12:43 UTC
Re^3: SmallTalk-like Message browser
by diotalevi (Canon) on Jul 05, 2007 at 15:07 UTC

    I haven't seen how I can get Squeak's browser to decide which senders of "new" are the relevant senders. I've been of the opinion that it also punts on the subject of allomorphism. I figure that if ST punts, I'm ok to do so also.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2015-07-02 05:58 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 (29 votes), past polls