Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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="http://www.perlmonks.org/index.pl?node_id=167834">this</a> but with [id://167834|that] or even just [167834|that].

      Your way doesn't work for monks that use www.perlmonks.com, 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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2015-08-30 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (349 votes), past polls