package Monks::Data; use strict; use warnings; use parent 'Monks'; BEGIN { use Exporter(); our $VERSION = 20160808.00; our @ISA = qw(Exporter); } sub version { $Monks::Data::VERSION; } { my @fluffy; BEGIN { @fluffy = qw( Rabbits Minks Cats ); } sub is_fluffy { my $animal = shift; for (@fluffy) { return 'Yes' if $animal eq $_; } return 'No'; } } { my %textures; BEGIN { %textures = ( Rabbits => 'soft', Minks => 'supersoft', Cats => 'coarse', ); } sub get_texture { my $animal = shift; my $texture = 'unknown'; $texture = $textures{$animal} if exists $textures{$animal}; return $texture; } } 1;