use feature 'switch' for <when> on perl 5.10.1 Debian 6.0.8