1MakeMethods::Template::USscearlaCro(n3t)ributed Perl DocMuamkeenMteatthioodns::Template::Scalar(3)
2
3
4

NAME

6       Class::MakeMethods::Template::Scalar - Methods for blessed scalars
7

SYNOPSIS

9         package MyObject;
10         use Class::MakeMethods::Template::ExternalData (
11           new             => 'new',
12           scalar          => 'foo',
13         );
14
15         package main;
16
17         my $obj = MyObject->new( foo => "Foozle" );
18         print $obj->foo();            # Prints Foozle
19         $obj->foo("Bamboozle");       # Sets $$obj
20         print $obj->foo();            # Prints Bamboozle
21

DESCRIPTION

23       Supports the Generic object constructor and accessors meta-method
24       types, but uses scalar refs as the underlying implementation type, so
25       only one accessor method can be used effectively.
26
27       Standard Methods
28
29       The following methods from Generic are all supported:
30
31         new
32         scalar
33         string
34         string_index
35         number
36         boolean
37         bits
38         array
39         hash
40         tiedhash
41         hash_of_arrays
42         object
43         instance
44         array_of_objects
45         code
46         code_or_scalar
47
48       See Class::MakeMethods::Template::Generic for the interfaces and behavā€
49       iors of these method types.
50
51       However, note that due to special nature of this package, all accessor
52       methods reference the same scalar value, so setting a value with one
53       method will overwrite the value retrieved by another.
54
55
56
57perl v5.8.8                       2004-09-06  MakeMethods::Template::Scalar(3)
Impressum