mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-13 18:24:39 +02:00
add missing use line
This commit is contained in:
@@ -262,6 +262,7 @@ sub increment {
|
|||||||
|
|
||||||
# Methods can be called on a class or object instance with the arrow operator.
|
# Methods can be called on a class or object instance with the arrow operator.
|
||||||
|
|
||||||
|
use MyCounter;
|
||||||
my $counter = MyCounter->new;
|
my $counter = MyCounter->new;
|
||||||
print $counter->count, "\n"; # 0
|
print $counter->count, "\n"; # 0
|
||||||
$counter->increment;
|
$counter->increment;
|
||||||
|
Reference in New Issue
Block a user