Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Reverse engineering

by matth (Monk)
on Jan 31, 2003 at 14:21 UTC ( #231617=perlquestion: print w/ replies, xml ) Need Help??
matth has asked for the wisdom of the Perl Monks concerning the following question:

Is there software that can undertake reverse engineering of Perl OO scripts. Reverse engineering is where language code can be converted to object schemas. I have seen software like this for Java and C++ (although not used these features). If there isn't software that can do this for Perl, I would like to ask why. Is it simply because of the way the language works.

Comment on Reverse engineering
Replies are listed 'Best First'.
Re: Reverse engineering
by gjb (Vicar) on Jan 31, 2003 at 14:33 UTC

    It'd be very hard for Perl since it is weakly typed. Suppose an object is implemented using a hash, how can you determine the type of the attributes? Similarly, what are the arguments to a method?

    Another point: methods can parse their arguments using shift(@_) or by filling a local hash, again it's almost impossible to figure out what's going on automatically.

    Just my 2 cents, -gjb-

Re: Reverse engineering
by Heidegger (Hermit) on Jan 31, 2003 at 14:31 UTC

    This question has been asked before.

    Check the Q&A answer about UML diagrams here.

    Perl isn't as advanced on OO modelling as C++/Java are, which have dozens of tools. Once I wanted to try the AutoDia tool under Windows and couldn't install it. If I'll have to draw class diagrams for my Perl code, I think I'll just take a regular UML modelling tool and draw diagrams by hand.

      Could you provide your links to other stuff on Perl Monks not with <a href="">this</a> but with [id://167834|that] or even just [167834|that].

      Your way doesn't work for monks that use, as you loose your logged-in status when switching from .com to .org.

      -- Hofmator

Re: Reverse engineering
by Heidegger (Hermit) on Jan 31, 2003 at 14:34 UTC
    Strongly typed languages like C++ and Java went very far with OO diagram modelling. The next hype with OO is refactoring and there are already automatic tools for these languages. It's a pity, but Perl is still behind with refactoring too.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://231617]
Approved by gjb
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2015-11-28 06:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (738 votes), past polls