Skip to content

Commit

Permalink
avoid fatal errors when dist_dir() doesn't exist (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfx committed Mar 11, 2014
1 parent 1250173 commit 741b24c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Text/Md2Inao/Builder/InDesign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ tie my %meta2label, "Tie::IxHash",
sub _new {
my $class = shift;
my $self = $class->SUPER::_new(@_);
for my $dir('config', dist_dir('Text-Md2Inao')) {

# check the repo's config/ first, and then try to get dist_dir()
for my $dir('config', eval { dist_dir('Text-Md2Inao') }) {
if (-d $dir) {
$self->load_filter_config(path($dir, 'id_filter.json'));
last;
Expand Down

0 comments on commit 741b24c

Please sign in to comment.