| 1 | package WWW::NOS::Open::Version 0.100; # -*- cperl; cperl-indent-level: 4 -*- | ||||||||||
| 2 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 5 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 5 | ▶ | use 5.014000; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 5 | ▶ | use Moose qw/around has/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 5 | ▶ | use namespace::autoclean '-also' => qr/^__/sxm; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 5 | ▶ | use Readonly; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 5 | Readonly::Scalar my $UNDER => q{_}; | |||||||||
| 13 | 5 | Readonly::Scalar my $GETTER => q{get}; | |||||||||
| 14 | |||||||||||
| 15 | 5 | my @strings = qw(version build); | |||||||||
| 16 | 5 | ▶ | while ( my $string = shift @strings ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 10 | has $UNDER | |||||||||
| 18 | . $string => ( | ||||||||||
| 19 | 'is' => 'ro', | ||||||||||
| 20 | 'isa' => 'Str', | ||||||||||
| 21 | 'reader' => $GETTER . $UNDER . $string, | ||||||||||
| 22 | 'init_arg' => $string, | ||||||||||
| 23 | ); | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | around 'BUILDARGS' => sub { | ||||||||||
| 27 | 2 | ▶ | my $orig = shift; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 28 | 2 | my $class = shift; | |||||||||
| 29 | 2 | my ( $version, $build ) = @_; | |||||||||
| 30 | 2 | return $class->$orig( | |||||||||
| 31 | 'version' => $version, | ||||||||||
| 32 | 'build' => $build, | ||||||||||
| 33 | ); | ||||||||||
| 34 | 5 | }; | |||||||||
| 35 | |||||||||||
| 36 | 5 | ▶ | no Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 37 | |||||||||||
| 38 | ## no critic qw(RequireExplicitInclusion) | ||||||||||
| 39 | 5 | __PACKAGE__->meta->make_immutable; | |||||||||
| 40 | ## use critic | ||||||||||
| 41 | |||||||||||
| 42 | 5 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||
| 45 | |||||||||||
| 46 | =encoding utf8 | ||||||||||
| 47 | |||||||||||
| 48 | =head1 NAME | ||||||||||
| 49 | |||||||||||
| 50 | WWW::NOS::Open::Version - version of the Open NOS REST API. | ||||||||||
| 51 | |||||||||||
| 52 | =head1 VERSION | ||||||||||
| 53 | |||||||||||
| 54 | This document describes WWW::NOS::Open version 0.100. | ||||||||||
| 55 | |||||||||||
| 56 | =head1 SYNOPSIS | ||||||||||
| 57 | |||||||||||
| 58 | use WWW::NOS::Open::Version; | ||||||||||
| 59 | |||||||||||
| 60 | =head1 DESCRIPTION | ||||||||||
| 61 | |||||||||||
| 62 | =head1 SUBROUTINES/METHODS | ||||||||||
| 63 | |||||||||||
| 64 | =head2 C<new> | ||||||||||
| 65 | |||||||||||
| 66 | =over | ||||||||||
| 67 | |||||||||||
| 68 | =item 1. The version number as string, like 'v1' | ||||||||||
| 69 | |||||||||||
| 70 | =item 2. The build number as string, like '0.0.1' | ||||||||||
| 71 | |||||||||||
| 72 | =back | ||||||||||
| 73 | |||||||||||
| 74 | =head2 C<get_version> | ||||||||||
| 75 | |||||||||||
| 76 | Returns the version number as string. | ||||||||||
| 77 | |||||||||||
| 78 | =head2 C<get_build> | ||||||||||
| 79 | |||||||||||
| 80 | Returns the build number as string. | ||||||||||
| 81 | |||||||||||
| 82 | =head1 CONFIGURATION AND ENVIRONMENT | ||||||||||
| 83 | |||||||||||
| 84 | =head1 DEPENDENCIES | ||||||||||
| 85 | |||||||||||
| 86 | =over 4 | ||||||||||
| 87 | |||||||||||
| 88 | =item * L<Moose|Moose> | ||||||||||
| 89 | |||||||||||
| 90 | =item * L<namespace::autoclean|namespace::autoclean> | ||||||||||
| 91 | |||||||||||
| 92 | =back | ||||||||||
| 93 | |||||||||||
| 94 | =head1 INCOMPATIBILITIES | ||||||||||
| 95 | |||||||||||
| 96 | =head1 DIAGNOSTICS | ||||||||||
| 97 | |||||||||||
| 98 | =head1 BUGS AND LIMITATIONS | ||||||||||
| 99 | |||||||||||
| 100 | Please report any bugs or feature requests at | ||||||||||
| 101 | L<RT for rt.cpan.org|https://rt.cpan.org/Dist/Display.html?Queue=WWW-NOS-Open>. | ||||||||||
| 102 | |||||||||||
| 103 | =head1 AUTHOR | ||||||||||
| 104 | |||||||||||
| 105 | Roland van Ipenburg, E<lt>ipenburg@xs4all.nlE<gt> | ||||||||||
| 106 | |||||||||||
| 107 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 108 | |||||||||||
| 109 | Copyright 2012 by Roland van Ipenburg | ||||||||||
| 110 | |||||||||||
| 111 | This library is free software; you can redistribute it and/or modify | ||||||||||
| 112 | it under the same terms as Perl itself, either Perl version 5.14.0 or, | ||||||||||
| 113 | at your option, any later version of Perl 5 you may have available. | ||||||||||
| 114 | |||||||||||
| 115 | =head1 DISCLAIMER OF WARRANTY | ||||||||||
| 116 | |||||||||||
| 117 | BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY | ||||||||||
| 118 | FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN | ||||||||||
| 119 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES | ||||||||||
| 120 | PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER | ||||||||||
| 121 | EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||||||||||
| 122 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE | ||||||||||
| 123 | ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH | ||||||||||
| 124 | YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL | ||||||||||
| 125 | NECESSARY SERVICING, REPAIR, OR CORRECTION. | ||||||||||
| 126 | |||||||||||
| 127 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||||||||||
| 128 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR | ||||||||||
| 129 | REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE | ||||||||||
| 130 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, | ||||||||||
| 131 | OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE | ||||||||||
| 132 | THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | ||||||||||
| 133 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | ||||||||||
| 134 | FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | ||||||||||
| 135 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF | ||||||||||
| 136 | SUCH DAMAGES. | ||||||||||
| 137 | |||||||||||
| 138 | =cut | ||||||||||