NAME
Const - Facility for creating read-only scalars, arrays, hashes
VERSION
Version 0.001
SYNOPSIS
const my $foo => 'a scalar value';
const my @bar => qw/a list value/;
const my %buz => (a => 'hash', of => 'something');
SUBROUTINES/METHODS
const $var, $value
const @var, @value...
const %var, %value...
This the only function of this module, it is exported by default. It takes a scalar, array or hash lvalue as first argument, and a list one or more values depending on the type of the first argument as the value for the variable. It will set the variable to that value and subsequently make it readonly.
AUTHOR
Leon Timmermans, <leont at cpan.org>
BUGS
Please report any bugs or feature requests to bug-const at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Const. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Const
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
The interface for this module was inspired by Eric Roode's Readonly, but the implementation is radically different to be faster and less fragile.
LICENSE AND COPYRIGHT
Copyright 2010 Leon Timmermans.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.