| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
# Copyright 2011-2026, Paul Johnson ([email protected]) |
| 4 |
|
| 5 |
# This software is free. It is licensed under the same terms as Perl itself. |
| 6 |
|
| 7 |
# The latest version of this software should be available from my homepage: |
| 8 |
# https://pjcj.net |
| 9 |
|
| 10 |
# __COVER__ skip_test !(eval "use Moose; 23") |
| 11 |
# __COVER__ skip_reason Moose not available or unreliable with Devel::Cover |
| 12 |
|
| 13 |
use 5.020; |
| 14 |
|
| 15 |
package Foo; |
| 16 |
|
| 17 |
use Moose; |
| 18 |
|
| 19 |
has bar => ( |
| 20 |
is => 'rw', |
| 21 |
isa => 'Maybe[Str]', |
| 22 |
); |
| 23 |
|
| 24 |
package main; |
| 25 |
|
| 26 |
my $example = Foo->new(); |
| 27 |
$example->bar('whatever'); |
| 28 |
say $example->bar(); |