Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

Phaser: what does that mean in Perl context? #22281

Open jkeenan opened 2 weeks ago

jkeenan commented 2 weeks ago

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?

guest20 commented 2 weeks ago

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

mauke commented 2 weeks ago

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

Grinnz commented 2 weeks ago

Perhaps it would be useful to add to perlglossary