perl5
perl5 copied to clipboard
Phaser: what does that mean in Perl context?
In a comment in another ticket today, @leonerd used the term phaser:
Certainly we could create (and encourage folks to use) a separate
DESTRUCT **phaser** that is a **phaser**, not a method, and ensure
each one only gets invoked after that particular part of the
constructor has completed successfully.
"Phaser" is a term with which I was not familiar outside the Star Trek universe, so I decided to look for it in our documentation. Variants appear in these files:
$ ack -il '\bphaser' . |sort
MANIFEST
perly.act
perly.h
perly.tab
perly.y
pod/perlclassguts.pod
pod/perlfunc.pod
pod/perlsyn.pod
Porting/deparse-skips.txt
toke.c
... of which perly.act, perly.h and perly.tab are files generated from perly.y. But I could not locate any specific definition for phaser in our documentation, nor did DDG or Google searches come up with anything for phaser relevant to design or implementation of computer languages.
Suggestions?
Sounds like those subs that perl calls when switching phases of compiling/running program... like BEGIN/END/INITCHECK and friends from perlmod.
They happen when ${^GLOBAL_PHASE} changes, so "phaser" makes sense, grammatically
Edit: Also, pew pew pew
https://docs.raku.org/language/phasers
Perhaps it would be useful to add to perlglossary
Perhaps it would be useful to add to perlglossary
Assuming that you meant the Glossary maintained as part of perlfaq, I have opened https://github.com/perl-doc-cats/perlfaq/pull/146 upstream.
I didn't see this before. He likely meant
He likely meant Porting/Glossary, and I think it should be added there
He likely meant
Porting/Glossary, and I think it should be added there
No, Porting/Glossary is a generated file. Notwithstanding its name, it's not intended to be a general glossary of Perl lingo. It states:
This file is built by metaconfig.
This file contains a description of all the shell variables whose value is
determined by the Configure script. Variables intended for use in C
programs (e.g. I_UNISTD) are already described in config_h.SH.
'phaser' does not refer to anything that would be determined by running ./Configure.
The patch I submitted has been accepted upstream, so it will eventually make its way into the core distribution once a new CPAN release of the perlfaq distribution is released. (I don't know when that will be.)
Sorry to jump in late, but even if it is generated, the generation process (mkgloss.pl) can be amended to add in extra entries from e.g. Porting/Glossary.extra or somesuch.