[Koha-patches] [PATCH] Quick Spine Label Printer
Kyle Hall
kyle.m.hall at gmail.com
Fri Jul 10 16:12:55 CEST 2009
I wrote it like that to be a bit more self-documenting. I image the
perl bytecode compiler would render both styles to the same bytecode.
I've sent a new patch with your suggestion implemented.
Kyle
http://www.kylehall.info
Information Technology
Crawford County Federated Library System ( http://www.ccfls.org )
On Fri, Jul 10, 2009 at 10:04 AM, Joe
Atzberger<joe.atzberger at liblime.com> wrote:
>
>> +while ( my ($key, $value ) = each(%$data) ) {
>> + my $replacefield = "<$key>";
>> + my $replacedby = $value;
>> + $scheme =~ s/$replacefield/$replacedby/g;
>> +}
>
> Why not just name the variable (like $value) what you want it to be
> ($replacedby) when you declare it the first time? Why bother reassigning it
> to a 2nd variable and doing nothing with the first?
>
> Or just do:
> $scheme =~ s/<$key>/$value/g;
>
> --
> Joe Atzberger
> LibLime - Open Source Library Solutions
>
More information about the Koha-patches
mailing list