tracks/perl5/exercises/bob/.meta/solutions/Bob.pm in trackler-2.2.1.110 vs tracks/perl5/exercises/bob/.meta/solutions/Bob.pm in trackler-2.2.1.111

- old
+ new

@@ -1,17 +1,17 @@ # Declare package 'Bob' with version -package Bob 2; +package Bob 3; use strict; use warnings; sub hey { my ($text) = @_; - return 'Fine. Be that way!' - if $text =~ /^\s*$/; - return 'Whoa, chill out!' - if uc($text) eq $text and $text =~ /\p{Uppercase}/; - return 'Sure.' - if $text =~ /\?\s*$/; + if (uc($text) eq $text && $text =~ /\p{Uppercase}/) { + return 'Calm down, I know what I\'m doing!' if $text =~ /\?\s*$/; + return 'Whoa, chill out!'; + } + return 'Fine. Be that way!' if $text =~ /^\s*$/; + return 'Sure.' if $text =~ /\?\s*$/; return 'Whatever.'; } 1;