Acme-CreatingCPANModules
view release on metacpan or search on metacpan
lib/Acme/CreatingCPANModules.pm view on Meta::CPAN
As you can see, all our tests have passed... but that's simply because
we still don't have anything interesting in our module...
Let's add some code. [I add the code for new(), set() and get(), as
follows:
sub new {
my $self = shift;
my $foo = shift;
bless \$foo, $self;
}
sub set {
my $self = shift;
my $newfoo = shift;
defined $newfoo or return undef;
$$self = $newfoo;
return $self->get();
}
lib/Acme/CreatingCPANModules.pm view on Meta::CPAN
=head2 new
Creates a new Acme::CreatingCPANModules object.
=cut
sub new {
my $self = shift;
my $foo = shift;
bless \$foo, $self;
}
=head2 set
Sets the new value of the object.
=cut
sub set {
my $self = shift;
slides/slide13.html view on Meta::CPAN
=head2 new
Creates a new Acme::CreatingCPANModules object.
=cut
sub new {
my $self = shift;
my $foo = shift;
bless \$foo, $self;
}
[...]
</pre>
</div>
<!-- BEGIN bottom -->
<div id="bottombar">
<table width="100%">
<tr>
( run in 0.457 second using v1.01-cache-2.11-cpan-de7293f3b23 )