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

> Where were you planning on storing the code for stricter?

stricter is not a standard compiler directive, but a module importing pragmas.

To avoid naming conflicts with future pragmas it shouldn't even be named "stricter", rather "My::stricter"

(Still lowercasing stricter could be discussed, but I think it's good practice to signal compilation effects)

Anyway I bet some of the pragmas listed will not support the import interface.

... tend to affect the compilation of your program, and thus will usually work well only when used within a use, or no. (added underlining)

Cheers Rolf

Replies are listed 'Best First'.
Re^13: Howto "use" backward compability packages of new "feature"s
by ikegami (Patriarch) on Aug 26, 2010 at 14:41 UTC

    You are mistaken. stricter is a lexically scoped compile-time effect from a use statement. It's very much a pragma.

    To avoid naming conflicts with future pragmas it shouldn't even be named "stricter", rather "My::stricter"

    And it should have documentation. Not relevant.

    Anyway I bet some of the pragmas listed will not support the import interface.

    Are you saying there are pragmas that don't use use, or that use doesn't call import as documented?

    Not only that, but it's impossible for a pragma to function without defining an import method. Pragmas must execute code every time its use is encountered, so they must use import. require only executes code the first time it's called for a module. Not using the "import interface" is impossible.)

    Update: Added second-last paragraph.