Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^2: Equivalency of Code

by adamk (Chaplain)
on Feb 08, 2005 at 00:19 UTC ( #428870=note: print w/replies, xml ) Need Help??

in reply to Re: Equivalency of Code
in thread Equivalency of Code

You couldn't have picked a worse time to mention Perl::Compare really.

The normalization overhaul has taken something that did about 10-15 normalization "things" and now only has one (removal of insignificant things like whitespace/pod/comments).

The original (and still current to some degree) intent of PPI-style normalization is to check to see if changes to code "matter" or not.

For example this:
my $foo = 1; # comment
Is "equivalent" to this:
my $foo=1 ;
As the library of normalization functions grows back towards (and past) what the original and now abandoned Perl::Compare implementation had, it is only really intended to factor out changes like:
'foo' ---> "foo" "foo$bar" ---> "foo${bar}"; etc... etc...
One idea was to let other people edit "your" code, while being certain that they haven't actually changed anything.

I'm sure you can think of others.

In any case, the three above example may well be different, especially if they are object with overloaded operators.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2022-05-26 00:49 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (91 votes). Check out past polls.