# DayPredict.pm # maps moods to predictions package DayPredict; use strict; use warnings; sub predict { my $mood = shift; if ( $mood eq 'happy' ) { return 'be great'; } elsif ( $mood eq 'sad' ) { return 'get better'; } else { return; # didn't get a mood so return undef } } 1; # module must return a true value