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

Re^2: SmallTalk-like Message browser

by rhesa (Vicar)
on Jul 05, 2007 at 12:26 UTC ( [id://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.

Replies are listed 'Best First'.
Re^3: SmallTalk-like Message browser
by jdporter (Paladin) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://625035]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-03-28 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found