1#!/usr/bin/perl
2
3# Copyright 2011-2019, Paul Johnson (paul@pjcj.net)
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# http://www.pjcj.net
9
10# __COVER__ skip_test $] < 5.010 || !(eval "use Moose; 23")
11# __COVER__ skip_reason Moose not available or unreliable with Devel::Cover
12
13use 5.010;
14
15package Foo;
16
17use Moose;
18
19has bar => (
20    is      => 'rw',
21    isa     => 'Maybe[Str]',
22);
23
24package main;
25
26my $example = Foo->new();
27$example->bar('whatever');
28say $example->bar();
29