in reply to What's the right way to include a config file as a .pm bareword?

PerlCritic rules are sometimes just good suggestions, and often the experienced programmer will know better.

$ perlcritic --verbose 11 foo.pl "require" statement with library name as string at line 6, near 'requi +re '/tmp/config.pl';'. Modules::RequireBarewordIncludes (Severity: 5) When including another module (or library) via the `require' or `u +se' statements, it is best to identify the module (or library) using a bareword rather than an explicit path. This is because paths are u +sually not portable from one machine to another. Also, Perl automatically assumes that the filename ends in '.pm' when the library is expres +sed as a bareword. So as a side-effect, this Policy encourages people to +write '*.pm' modules instead of the old-school '*.pl' libraries. use 'My/Perl/Module.pm'; #not ok use My::Perl::Module; #ok

So this means the rule exists because its author(s) were worried that people are writing Perl-4-style libraries. Since in this case you know better and config.pl is not a library, you are free to overrule PerlCritic:

require '/tmp/config.pl'; ## no critic (RequireBarewordIncludes)

Of course there are other ways to "fix" the issue, e.g. to use do or even eval (but require is fine). Also, you could just turn config.pl into MyConfig.pm and make things easier that way too.