in reply to Header file management

There are several modules on CPAN that can do this for you (the AM post provided a few links). I've used Syntax::Collector, here's a working example based on your post:

package MyCommonUses; use warnings; use 5.018; use Syntax::Collector q{ use strict 0; use warnings 0; use feature 0 ':5.18'; use Data::Dumper 0; use Scalar::Util 0 qw(blessed); use Cwd 0 qw(cwd abs_path); }; 1;

Replies are listed 'Best First'.
Re^2: Header file management
by smaines (Novice) on Apr 30, 2018 at 15:32 UTC

    That was just the thing I needed, thank you!

    The required version thing threw me a bit. As it turned out, I needed to guess where to stick the zero with no if

    no if 0 $] >= 5.018, warnings => "experimental::smartmatch";

    I looked at the source for Syntax::Collector. Rewriting that code not to require a version might be a useful exercise, but not for me today.

    Thanks Again!

    -SM

      no if 0 $] >= 5.018, warnings => "experimental::smartmatch";

      As you know, smart matching is experimental, which means it may change significantly or even go away in future versions of Perl. In the long run, you may want to avoid it until it becomes more clear which direction it's heading in.