in reply to Readonly oddity
Your systax does NOT match that which is documented for 1.03 & 2.00:
use Readonly; # Read-only scalar Readonly::Scalar $sca => $initial_value; Readonly::Scalar my $sca => $initial_value;
Version 1.03 is very old: From CPAN: "This documentation describes version 1.03 of Readonly.pm, April 20, 2004). " The more recent version is 2.00 (with a different maintainer) and a copyright date of "2013-2014." (And that doesn't begin to address the archaic versions of Perl you mention -- 5.14 and, even more so, 5.02... which, if correct makes the "aside" below relevant).)
Aside; unknown relevance but perhaps of interest from the 2.00 doc:
Please note that most users of Readonly no longer need to install the companion module Readonly::XS which is recommended but not required for perl 5.6.x and under. Please do not force it as a requirement in new code and do not use the package variable $Readonly::XSokay in code/tests. For more, see "Internals" in the section on Readonly's new internals.
Updated markup and s/"The version you're using.../"Version 1.03...."/p>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Readonly oddity
by hippo (Archbishop) on Jan 26, 2016 at 13:38 UTC | |
|
Re^2: Readonly oddity
by Mr. Muskrat (Canon) on Jan 26, 2016 at 16:09 UTC | |
by tangent (Parson) on Jan 26, 2016 at 16:22 UTC | |
by Mr. Muskrat (Canon) on Jan 26, 2016 at 16:30 UTC | |
|
Re^2: Readonly oddity
by mr_ron (Deacon) on Jan 26, 2016 at 14:20 UTC | |
by choroba (Cardinal) on Jan 26, 2016 at 14:23 UTC |