| 1 | package Interchange6::Types; | ||
| 2 | |||
| 3 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 5 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 5 | ▶ | use Type::Library -base, -declare => qw( Cart CartCost CartProduct ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 5 | ▶ | use Type::Utils -all; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 5 | ▶ | use Types::Standard -types; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | BEGIN { | ||
| 11 | 5 | ▶ | extends "Types::Standard", "Types::Common::Numeric", |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | "Types::Common::String"; | ||
| 13 | } | ||
| 14 | |||
| 15 | 5 | class_type Cart, { class => 'Interchange6::Cart' }; | |
| 16 | |||
| 17 | 5 | class_type CartCost, { class => 'Interchange6::Cart::Cost' }; | |
| 18 | 12 | ▶ | coerce CartCost, from Any, via { 'Interchange6::Cart::Cost'->new(@_) }; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 5 | class_type CartProduct, { class => 'Interchange6::Cart::Product' }; | |
| 21 | 0 | ▶ | coerce CartProduct, from Any, via { 'Interchange6::Cart::Product'->new(@_) }; |
|
Subroutine
__ANON__: not called CC=1 SCAR=1.2
| |||
| 22 | |||
| 23 | 5 | 1; | |
| 24 | __END__ | ||