Switch use in awstats

Iain Arnell iarnell at gmail.com
Mon Aug 15 13:04:25 UTC 2011


2011/8/15 Marcela Mašláňová <mmaslano at redhat.com>:
> On 08/13/2011 06:07 PM, Emmanuel Seyman wrote:
>>
>> Hi, Petr.
>>
>> I noticed yesterday that you had patched awstats to use if statements instead
>> of the switch module. The switch module is now back in Fedora (it was removed
>> from Perl core in 5.14 and is now a package in its own right) so feel free to
>> remove your patch, awstats should build fine without it.
>>
>> Emmanuel
>>
>
> Hello Emmanuel,
> I didn't package Switch module on purpose. Switch was removed from perl
> core, because it had a lot of bug reports. I suppose using if-else is
> safer.
> Switch was packaged last week by spot, so maintainers could use it, but
> they don't have to if they wish.
>

Or use Perl's native switch syntax: given/when. See "Switch
statements" in perlsyn for details.


-- 
Iain.



More information about the perl-devel mailing list