package My::Module; use warnings; use strict; use File::ShareDir; our $data_path = File::ShareDir::module_file(__PACKAGE__, 'mydata.yaml');