| 1 | package HTTP::Throwable::Variant; | ||||||||||
| 2 | 5 | our $AUTHORITY = 'cpan:STEVAN'; | |||||||||
| 3 | 5 | $HTTP::Throwable::Variant::VERSION = '0.027'; | |||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | use Package::Variant 1.002000 | ||||||||||
| 8 | 5 | importing => ['Moo', 'MooX::StrictConstructor'], | |||||||||
| 9 | 5 | ▶ | subs => [ qw(extends with) ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | sub make_variant { | ||||||||||
| 12 | 60 | ▶ | my ($class, $target_package, %arguments) = @_; | ||||||||
|
Subroutine
make_variant: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||
| 13 | 0 | extends @{ $arguments{superclasses} } | |||||||||
| 14 | 60 | ▶ | if @{ $arguments{superclasses} }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 60 | with @{ $arguments{roles} }; | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 5 | 1; | |||||||||
| 19 | |||||||||||
| 20 | =pod | ||||||||||
| 21 | |||||||||||
| 22 | =encoding UTF-8 | ||||||||||
| 23 | |||||||||||
| 24 | =head1 NAME | ||||||||||
| 25 | |||||||||||
| 26 | HTTP::Throwable::Variant - a package that constructs Moo-based HTTP::Throwables for you | ||||||||||
| 27 | |||||||||||
| 28 | =head1 VERSION | ||||||||||
| 29 | |||||||||||
| 30 | version 0.027 | ||||||||||
| 31 | |||||||||||
| 32 | =head1 OVERVIEW | ||||||||||
| 33 | |||||||||||
| 34 | This package is used by L<HTTP::Throwable::Factory> to build | ||||||||||
| 35 | exceptions at runtime. The exceptions are L<Moo>-based, with | ||||||||||
| 36 | L<MooX::StrictConstructor> applied as well. It takes two arguments: | ||||||||||
| 37 | C<superclasses>, an arrayref of classes to extend, and C<roles>, an | ||||||||||
| 38 | arrayref of roles to compose. | ||||||||||
| 39 | |||||||||||
| 40 | =head1 AUTHORS | ||||||||||
| 41 | |||||||||||
| 42 | =over 4 | ||||||||||
| 43 | |||||||||||
| 44 | =item * | ||||||||||
| 45 | |||||||||||
| 46 | Stevan Little <stevan.little@iinteractive.com> | ||||||||||
| 47 | |||||||||||
| 48 | =item * | ||||||||||
| 49 | |||||||||||
| 50 | Ricardo Signes <rjbs@cpan.org> | ||||||||||
| 51 | |||||||||||
| 52 | =back | ||||||||||
| 53 | |||||||||||
| 54 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 55 | |||||||||||
| 56 | This software is copyright (c) 2011 by Infinity Interactive, Inc. | ||||||||||
| 57 | |||||||||||
| 58 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 59 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 60 | |||||||||||
| 61 | =cut | ||||||||||
| 62 | |||||||||||
| 63 | __END__ | ||||||||||