in reply to Re: Re: Re: Re: Worst thing you ever made with Perl
in thread Worst thing you ever made with Perl
Putting a space in the middle of a variable is just a wee bit different from indenting lines within a function.Is it?
Yes, absolutely, without qualification, it is fundamentally different. Indenting everything within a block is a strongly-recommended best practice in good coding style, because it greatly enhances clarity. Being told that I shouldn't do that with POD is as far as I'm concerned a good enough reason in itself not to use POD (within blocks -- which is where I wanted to put the information in question), because I would have to adopt an unclear coding style in order to do so. Now I understand why people who use POD stick it all in big huge chunks, rather than interspersing it through the code like comments -- because fundamentally it's not designed to be interspersed the way comments can be. (I had been led to believe otherwise.)
Putting whitespace in variable names (as, $foo {bar}) is something I would do in an obfuscation, to make the code *less* clear. If it alters the meaning, so what? It isn't something I'd normally expect good code to ever do, so at worst it's a very minor gotcha.
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Worst thing you ever made with Perl
by Abigail-II (Bishop) on Oct 01, 2003 at 16:08 UTC | |
by jonadab (Parson) on Oct 01, 2003 at 17:02 UTC | |
by Abigail-II (Bishop) on Oct 01, 2003 at 19:27 UTC |