develooper Front page | perl.perl5.porters | Postings from November 1999

Re: making pragmas?

Thread Previous | Thread Next
Jeff Pinyan
November 19, 1999 17:40
Re: making pragmas?
Message ID:
On Nov 19, Larry Wall blah blah blah:

> writes:
> : Is there something internally special about pragmas?  Specifically, is
> : there any reason we can't make our own?
> It depends, of course, on what you mean by "we", and "our own".
> Anybody can hack Perl however they want.  However, if you don't want
> your private changes to collide with the future of the language itself,
> then it's good to make the pragma public property (or at least reserve
> the name), in which case it's likely to have to go through a discussion
> phase before "we" becomes "us".  Or something like that...

I guess I see what you're saying.  I guess my main request is to be able
to create a module which can be used not unlike  I've written a
module that allows pre-5.6 versions of Perl (perhaps not all, though) to
create warning handlers easily, kind of like the new 5.6 pragma for
lexical warnings.

It'd just be nice if average joes could write their own pragma-like
modules that can be used by Perl without having to freak up the source

  use strict;
    no strict 'vars';

I'd like to be able to write such a module/pragma, and not have to
petition p5p or munge source code to get it to work as a pragma works.
"We" in my original post meant those people in the Perl community that
know enough to program Perl well, but don't know how to go about munging
source code.  But perhaps such power should not be delegated to average
joes; I don't know.


  jeff pinyan:     perl stuff:
  "The Art of Perl"           
  PerlMonth - An Online Perl Magazine

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About