John M. Dlugosz,
I will quote the section germane to the conversation:
An attempt to set an unrecognized attribute is a fatal error. (The error is trappable, but it still stops the compilation within that eval.) Setting an attribute with a name that's all lowercase letters that's not a built-in attribute (such as "foo") will result in a warning with -w ...
I agree that the docs could use some explanation (echo'd by others in the thread I pointed to). On that front I can't offer you any insight other than to say that if you ignore the attributes pragma and use one of the modules, it does just seem to work. The only module I found useful (run arbitrary code at different phases) though (Attribute::Handlers::Prospective) used source filters.
|