Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why call it a pragma and not just a module?

module pragma
0
Posted

Why call it a pragma and not just a module?

0

Because tradition holds that pragmatic modules normally do something other than the normal importing of functions that modules do (i.e. base, fields, etc.). The classes name immediately communicates that this is not a normal module and to expect a syntax specific to the pragma rather than the normally expected list of functions. § The short, lowercase name also seemed very sensible to match the name of the pragma to the classes run time function used for dynamic class manipulation. Both expect exactly the same argument syntax. § use classes name=>’MyClass’; classes-name=>’MyClass’; § It also makes using the classes:: utilities nice: § $event->classes::dump; $event->classes::id; use classes name=>’MyClass’, new=>’classes:new_init’… § • Why not allow for different constructor names? Why only new? Because we really don’t need dozens of different constructor names. Using new is a best practiced followed not only by most of the Perl community but other languages as well. § See Give every

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123