Indentation is not something to fix later. The whole idea is to make code more readable so you don't confuse yourself when you write it and people reading it don't get confused. I suggest you run it through perltidy. The fact that it works has nothing to do with indentation. See obfuscation for unreadable code that works just fine.
With OO you write accessors and then use them EXCLUSIVELY. The accessors provide the INTERFACE. By doing this you are free to change whatever you want about your internal object representation - so long as the accessors work the same all will be well with any code using your code.
Debug this:
my $interface = $obj->interrface;
$obj->{INTERRFACE} = $new_interface;
|