Switch use in awstats

Marcela Mašláňová mmaslano at redhat.com
Mon Aug 15 14:44:08 UTC 2011


On 08/15/2011 03:04 PM, Iain Arnell wrote:
> 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.
> 
> 

Um, given/when have almost the same amount of bugs ;-) I'm not saying do
not use new syntax. But as a maintainer of many packages I prefer older
syntax.



More information about the perl-devel mailing list