Front page | perl.perl5.porters |
Postings from November 1999
Re: making pragmas?
Thread Previous
|
Thread Next
From:
Jeff Pinyan
Date:
November 19, 1999 17:40
Subject:
Re: making pragmas?
Message ID:
Pine.GSO.4.10.9911192036070.26722-100000@crusoe.crusoe.net
On Nov 19, Larry Wall blah blah blah:
> japhy@pobox.com 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 strict.pm. 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
code:
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.
--
MIDN 4/C PINYAN, USNR, NROTCURPI http://www.pobox.com/~japhy/
jeff pinyan: japhy@pobox.com perl stuff: japhy+perl@pobox.com
"The Art of Perl" http://www.pobox.com/~japhy/book/
CPAN ID: PINYAN http://www.perl.com/CPAN/authors/id/P/PI/PINYAN/
PerlMonth - An Online Perl Magazine http://www.perlmonth.com/
Thread Previous
|
Thread Next