develooper Front page | perl.perl5.porters | Postings from March 2023

Questions about the my Foo $var syntax

Thread Next
Robert Rothenberg
March 13, 2023 11:29
Questions about the my Foo $var syntax
Message ID:
There's some legacy syntax still used in some very old code bases, e.g. 

   my TheSchwartz::Job $job = shift;

As far as I can tell, this doesn't do anything except require that 
TheSchwartz::Job namespace exists. It doesn't require $job to be a 

I have some questions:

1. Is this documented anywhere still?

2. Is the syntax deprecated?

3. if not, are there plans to do something useful with it, e.g. enforce 
type constraints?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About