in reply to Re: Help with Best Practices for Module Paths when scripting across multiple machines
in thread Help with Best Practices for Module Paths when scripting across multiple machines
I'm not sure I'm answering my original question regarding best practices but using your advice I found the following works to load YAML files that are in a folder "next" to my modules.
Within my module:
Thanks very much for your help.use File::Basename; my $current_package = __PACKAGE__; my $path_to_module = dirname($INC{"$current_package.pm"}); my $path_to_yaml = $path_to_module; $path_to_yaml =~ s{modules}{yaml}; my $yaml_config = LoadFile($path_to_yaml.'/file_i_want_to_load.yaml');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Help with Best Practices for Module Paths when scripting across multiple machines
by RonW (Parson) on Nov 07, 2014 at 23:54 UTC |