develooper Front page | perl.perl5.porters | Postings from June 2022

Re: Pre-RFC: yield true feature

Thread Previous | Thread Next
Darren Duncan
June 7, 2022 09:05
Re: Pre-RFC: yield true feature
Message ID:
What would the effect of yield_true be on a Perl source file used as simple 
configuration data like the following, which I have actually practiced...

Contents of file

   use 5.38;  # includes yield_true
   my $config_rh = {...};  # last statement

Contents of program using it:

   my $config_rh = do '';

Note that I wrote the above from memory of something I did a couple decades ago, 
it may not be correct, but should have the right idea.

The point is, if yield_true is in effect, would it break the above usage pattern 
and result in the main program $config_rh containing true rather than the 
intended hash ref of config data?

Or is yield_true intended to apply in more limited circumstances than all 
compiled Perl files?

-- Darren Duncan

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