Subject: | Helper function - load_dfv_profiles() |
Hey Mark,
I've got a function that loads my profiles from an external file into a hash. Instead of having to lug this sub from project to project, I was wondering if you had any interest in adding it to the plugin. Here's the rough version without any caching:
sub load_dfv_profiles {
my $self = shift;
my $profiles = shift;
#
# Load DFV profiles
my %prf;
die "Invalid profile '$profiles'" unless defined $profiles && $profiles && -e $profiles;
require $profiles or warn "Error loading profiles from '$profiles': $!";
die "Profiles not loaded" unless keys %prf;
return \%prf;
}