perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

Phaser: what does that mean in Perl context?

Open jkeenan opened this issue 1 year ago • 3 comments

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?

jkeenan avatar Jun 15 '24 17:06 jkeenan

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

guest20 avatar Jun 15 '24 18:06 guest20

https://docs.raku.org/language/phasers

mauke avatar Jun 15 '24 18:06 mauke

Perhaps it would be useful to add to perlglossary

Grinnz avatar Jun 15 '24 18:06 Grinnz

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.

jkeenan avatar May 04 '25 16:05 jkeenan

I didn't see this before. He likely meant

khwilliamson avatar May 17 '25 18:05 khwilliamson

He likely meant Porting/Glossary, and I think it should be added there

khwilliamson avatar May 17 '25 18:05 khwilliamson

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.)

jkeenan avatar May 17 '25 18:05 jkeenan

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.

Tux avatar May 19 '25 13:05 Tux