On Sun, Nov 23, 2003 at 07:54:36PM +0100, Max Horn wrote:
> Am Freitag, 21.11.03 um 10:08 Uhr schrieb Daniel Macks:
> > 
> >Update of /cvsroot/fink/fink/perlmod/Fink
> >In directory sc8-pr-cvs1:/tmp/cvs-serv14848
> >
> >Modified Files:
> >     ChangeLog Services.pm
> >Log Message:
> >Revert handling $prefix1/$prefix2 in print_breaking to the way it was
> >before removal of print_breaking_* (which seems to be the correct
> >behavior).
>
> May I ask what exactly this fixes? I.e. in which cases was the code 
> causing problems?

The previous change broke handling of prefixes that were logically
false. Consider what happens for

  my $prefix1 = shift || "";

if one passed the zero chacter. That makes the shift false, so the
null string is used instead. (No, I can't find a place where this is
actually done, but it's a commonly-(mis)used idiom.) By switching
(back) to checking that it's defined at all (even if logically false)
this gotcha is removed. I hear perl5.9 will have a new single operator
that does what (I assume, and therefore re-implmented) was meant. If
not, obviously feel free to undo the change.

dan

-- 
Daniel Macks
[EMAIL PROTECTED]
http://www.netspace.org/~dmacks



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Fink-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to