What makes a module a pragmatic module?

perl

Solution

There's no solid definition for pragma. The closest to something official is in perlpragma.

- They usually modify the language or the behaviour of the parser.

- Their effect is usually lexically scoped.

I personally believe those are requirements (and it seems that perlpragma does too), but core modules vars and subs are documented to be pragmas even though their effect isn't lexically scoped.

base and lib don't match either of the criteria. What they do is provide information to "Perl itself". I guess that also qualifies as a pragma.

I consider my module `use syntax qw( loop );` to be pragmatic. (Shameless plug!)

Problem

I'm looking at the source of `base.pm` in the Perl distribution, and I don't see what distinguishes it from a "non-pragmatic" module. If `use base` is a "pragma", is it fundamentally different in any way from `use Foo` where `Foo` is any module?

Original source