|
NAMELV - LV ♥ lvalueSYNOPSISuse LV qw( lvalue get set ); my $xxx; sub xxx :lvalue { lvalue get { $xxx } set { $xxx = $_[0] } } xxx() = 42; say xxx(); # says 42 DESCRIPTIONThis module makes lvalue subroutines easy and practical to use. It's inspired by the lvalue module which is sadly problematic because of the existence of another module on CPAN called Lvalue. (They can get confused on file-systems that have case-insensitive file names.)LV comes with three different implementations, based on Variable::Magic, Sentinel and "tie"; it will choose and use the best available one. You can force LV to pick a particular implementation using: $ENV{PERL_LV_IMPLEMENTATION} = 'Magic'; # or 'Sentinel' or 'Tie' The tie implementation is the slowest, but will work on Perl 5.6 with only core modules. Functions
BUGSPlease report any bugs to <http://rt.cpan.org/Dist/Display.html?Queue=LV>.SEE ALSOlvalue, Sentinel.AUTHORToby Inkster <tobyink@cpan.org>.COPYRIGHT AND LICENCEThis software is copyright (c) 2013 by Toby Inkster.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. DISCLAIMER OF WARRANTIESTHIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Visit the GSP FreeBSD Man Page Interface. |