git.annexia.org
/
perl4caml.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Further tuning for initial release.
[perl4caml.git]
/
examples
/
TestClass.pm
1
package TestClass;
2
3
sub new
4
{
5
my $class = shift;
6
my $self = { foo => 1 };
7
bless $self, $class;
8
}
9
10
sub get_foo
11
{
12
my $self = shift;
13
$self->{foo}
14
}
15
16
sub set_foo
17
{
18
my $self = shift;
19
my $value = shift;
20
$self->{foo} = $value
21
}
22
23
1;