in reply to print stack of "do" files on error

See perlsyn. If you prepend a #line comment in front of the file, Perl will adjust the error message accordingly:

sub include { my($filename) = @_; open my $fh, '<', $filename or die "Couldn't read config file '$filename': $!"; my $content = do { local $/; <$fh> }; my $r = eval { join "\n", sprintf( qq(#line 1 "%s"', $filename ), $content }; ... }