Class::Accessor::Lvalue(3pm) User Contributed Perl Documentation Class::Accessor::Lvalue(3pm)NAME
Class::Accessor::Lvalue - create Lvalue accessors
SYNOPSIS
package Foo;
use base qw( Class::Accessor::Lvalue );
__PACKAGE__->mk_accessors(qw( bar ))
my $foo = Foo->new;
$foo->bar = 42;
print $foo->bar; # prints 42
DESCRIPTION
This module subclasses Class::Accessor in order to provide lvalue accessor makers.
CAVEATS
o Though Class::Accessor mutators allows for the setting of multiple values to an attribute, the mutators that this module creates handle
single scalar values only. This should not be too much of a hinderance as you can still explictly use an anonymous array.
o Due to the hoops we have to jump through to preserve the Class::Accessor ->get and ->set behaviour this module is potentially slow.
Should you not need the flexibility granted by the ->get and ->set methods, it's highly reccomended that you use Class::Acces-
sor::Lvalue::Fast which is simpler and much faster.
AUTHOR
Richard Clamp <richardc@unixbeard.net> with many thanks to Yuval Kogman for helping with the groovy lvalue tie magic used in the main
class.
COPYRIGHT
Copyright (C) 2003 Richard Clamp. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Class::Accessor, Class::Accessor::Lvalue::Fast
perl v5.8.8 2008-02-01 Class::Accessor::Lvalue(3pm)
Check Out this Related Man Page
Class::Accessor::Fast(3) User Contributed Perl Documentation Class::Accessor::Fast(3)NAME
Class::Accessor::Fast - Faster, but less expandable, accessors
SYNOPSIS
package Foo;
use base qw(Class::Accessor::Fast);
# The rest is the same as Class::Accessor but without set() and get().
DESCRIPTION
This is a faster but less expandable version of Class::Accessor. Class::Accessor's generated accessors require two method calls to
accompish their task (one for the accessor, another for get() or set()). Class::Accessor::Fast eliminates calling set()/get() and does the
access itself, resulting in a somewhat faster accessor.
The downside is that you can't easily alter the behavior of your accessors, nor can your subclasses. Of course, should you need this
later, you can always swap out Class::Accessor::Fast for Class::Accessor.
Read the documentation for Class::Accessor for more info.
EFFICIENCY
"EFFICIENCY" in Class::Accessor for an efficiency comparison.
AUTHORS
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. That means either (a) the GNU
General Public License or (b) the Artistic License.
ORIGINAL AUTHOR
Michael G Schwern <schwern@pobox.com>
SEE ALSO
Class::Accessor
perl v5.16.2 2009-09-15 Class::Accessor::Fast(3)
Hey all. I've been working on some fun with C and decided to write a Rock Paper Scissors game. The problem is, that when I try to compile the file, it gives "lvalue required as left operand of assignment" error. The error line is here:
for ((point1=0 && point2=0); ((point1=3) || (point2=3));... (4 Replies)
Hi,
This code was originally to print a sine function table. I modified it to print a tangent function table. I got an "lvalue" error which I can't solve...Any hint on why am I getting this error?
Here is the code:
// sintab.cpp
// Creates a tangent function table
#include <iostream>... (2 Replies)
We archive this amazing and true story by Richard Pyle illustrating how not to scuba dive.
A portion of this article was published in AquaCorps: BENT 3(2):51, 54 (0 Replies)
1. After trying to compile code error is given Lvalue required as left operand of assignment.
2. Relevant commands, code, scripts, algorithms:
if , else if
3. The attempts at a solution (include all code and scripts):
/*
File: incircles.cpp
Created by: James Selhorst
... (2 Replies)