| 1 | 4 | ▶ | use 5.006; # pragmas, qr |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | package MooseX::Has::Sugar; | ||
| 6 | |||
| 7 | 4 | our $VERSION = '1.000006'; | |
| 8 | |||
| 9 | # ABSTRACT: Sugar Syntax for moose 'has' fields | ||
| 10 | |||
| 11 | 4 | our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY | |
| 12 | |||
| 13 | 4 | ▶ | use Carp (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 4 | ▶ | use Sub::Exporter::Progressive ( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 4 | -setup => { | |
| 16 | exports => [ 'ro', 'rw', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', 'bare', ], | ||
| 17 | groups => { | ||
| 18 | isattrs => [ 'ro', 'rw', 'bare', ], | ||
| 19 | attrs => [ 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', ], | ||
| 20 | default => [ 'ro', 'rw', 'bare', 'required', 'lazy', 'lazy_build', 'coerce', 'weak_ref', 'auto_deref', ], | ||
| 21 | }, | ||
| 22 | }, | ||
| 23 | 4 | ); | |
| 24 | |||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | 1 | ▶ | sub bare() { |
|
Subroutine
bare: called CC=1 SCAR=0.0
Pod
documented
| |||
| 32 | 1 | return ( 'is', 'bare' ); | |
| 33 | } | ||
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | |||
| 41 | 2 | ▶ | sub ro() { |
|
Subroutine
ro: called CC=1 SCAR=0.0
Pod
documented
| |||
| 42 | 2 | return ( 'is', 'ro' ); | |
| 43 | } | ||
| 44 | |||
| 45 | |||
| 46 | |||
| 47 | |||
| 48 | |||
| 49 | |||
| 50 | |||
| 51 | 1 | ▶ | sub rw() { |
|
Subroutine
rw: called CC=1 SCAR=0.0
Pod
documented
| |||
| 52 | 1 | return ( 'is', 'rw' ); | |
| 53 | } | ||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | |||
| 61 | 8 | ▶ | sub required() { |
|
Subroutine
required: called CC=1 SCAR=0.0
Pod
documented
| |||
| 62 | 8 | return ( 'required', 1 ); | |
| 63 | } | ||
| 64 | |||
| 65 | |||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | |||
| 71 | 5 | ▶ | sub lazy() { |
|
Subroutine
lazy: called CC=1 SCAR=0.0
Pod
documented
| |||
| 72 | 5 | return ( 'lazy', 1 ); | |
| 73 | } | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | |||
| 79 | |||
| 80 | |||
| 81 | 7 | ▶ | sub lazy_build() { |
|
Subroutine
lazy_build: called CC=1 SCAR=0.0
Pod
documented
| |||
| 82 | 7 | return ( 'lazy_build', 1 ); | |
| 83 | } | ||
| 84 | |||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | 5 | ▶ | sub weak_ref() { |
|
Subroutine
weak_ref: called CC=1 SCAR=0.0
Pod
documented
| |||
| 92 | 5 | return ( 'weak_ref', 1 ); | |
| 93 | } | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | 5 | ▶ | sub coerce() { |
|
Subroutine
coerce: called CC=1 SCAR=0.0
Pod
documented
| |||
| 104 | 5 | return ( 'coerce', 1 ); | |
| 105 | } | ||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | 5 | ▶ | sub auto_deref() { |
|
Subroutine
auto_deref: called CC=1 SCAR=0.0
Pod
documented
| |||
| 114 | 5 | return ( 'auto_deref', 1 ); | |
| 115 | } | ||
| 116 | 4 | 1; | |
| 117 | |||
| 118 | __END__ | ||