On Thu, Mar 12, 2009 at 11:50:46PM +0100, "Stanisław T. Findeisen" wrote:

> Is there any way to change the values of [scalar/array] constants  
> defined via "use constant" pragma?

That seems a strange thing to want to do.  But useful for redefining pi, or
perhaps G, I suppose.

In general the answer is no.  But if you can live with a mandatory warning and
the knowledge that you have lied to perl (and you understand the effects that
brings, specifically with respect to constant propagation) then go ahead and
do it.

It's not a good idea, but it's not in perl's nature to pretend that she knows
better than you, even if she does.

If you want a constant that varies, can you not just use a variable?

-- 
Paul Johnson - [email protected]
http://www.pjcj.net

--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/


Reply via email to