in reply to Re^8: Howto "use" backward compability packages of new "feature"s
in thread Howto "use" backward compability packages of new "feature"s

pragmas are not even mentioned in require
Note that pragmas don't exist on the language level. That is, Perl (the language) doesn't treat modules whose name is all lowercase different from modules who do not. "Pragmas" (or as some people call them "pragmata") are a loosly defined concept; typically as 'modules that influence the compilation process in some way'. But any module that exports prototyped subroutines influences compilation. And so do source filters. Many people consider "constant.pm" to be a pragma, but all it does is export subs with an empty prototype. But Fcntl and POSIX do so as well.

Perhaps one could consider modules that set parts of @H and %H to be pragmas.

  • Comment on Re^9: Howto "use" backward compability packages of new "feature"s

Replies are listed 'Best First'.
Re^10: Howto "use" backward compability packages of new "feature"s
by LanX (Saint) on Aug 25, 2010 at 20:49 UTC
    they are called "compiler directives" in use which I think is quite OK.

    I just wanna know if I can "require+import" any pragma like I can do with "real" moduls.

    If yes I would like to consider to clarify this behavior in the documentation.

    Thats why I asked you to test if it works like this in your older perl installations.

    (something tells me that it wasn't always like it is now.)

    And if it can't be clearly documented because it's not a reliable feature only restricted to special pragmatas, I would like to know it.

    Cheers Rolf