in reply to Re: The best way to use constants
in thread The best way to use constants

If I want to trap a possible assignment to such a variable, I use Readonly.

This comparison of Readonly against some alternatives (like Scalar::Readonly) might be of interest here.

Replies are listed 'Best First'.
Re^3: The best way to use constants
by saurabh.hirani (Beadle) on Apr 03, 2009 at 06:13 UTC

    Thanks a lot guys for your viewpoints. Scalar::Readonly looks interesting and so does the idea of not using class methods and exporting the constants.