| 1 | package WWW::Namecheap::NS; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 2 | ▶ | use 5.006; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 6 | 2 | ▶ | use Carp(); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | =head1 NAME | ||||||||||||||
| 9 | |||||||||||||||
| 10 | WWW::Namecheap::NS - Namecheap API nameserver methods | ||||||||||||||
| 11 | |||||||||||||||
| 12 | =cut | ||||||||||||||
| 13 | |||||||||||||||
| 14 | 2 | our $VERSION = '0.06'; | |||||||||||||
| 15 | |||||||||||||||
| 16 | =head1 SYNOPSIS | ||||||||||||||
| 17 | |||||||||||||||
| 18 | Namecheap API nameserver methods. | ||||||||||||||
| 19 | |||||||||||||||
| 20 | Perhaps a little code snippet. | ||||||||||||||
| 21 | |||||||||||||||
| 22 | use WWW::Namecheap::NS; | ||||||||||||||
| 23 | |||||||||||||||
| 24 | my $foo = WWW::Namecheap::NS->new(); | ||||||||||||||
| 25 | ... | ||||||||||||||
| 26 | |||||||||||||||
| 27 | =head1 SUBROUTINES/METHODS | ||||||||||||||
| 28 | |||||||||||||||
| 29 | =head2 new | ||||||||||||||
| 30 | |||||||||||||||
| 31 | =cut | ||||||||||||||
| 32 | |||||||||||||||
| 33 | 0 | ▶ | sub new { | ||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||
| 34 | 0 | my $class = shift; | |||||||||||||
| 35 | |||||||||||||||
| 36 | 0 | my $params = _argparse(@_); | |||||||||||||
| 37 | |||||||||||||||
| 38 | 0 | for (qw(API)) { | |||||||||||||
| 39 | 0 | ▶ | Carp::croak("${class}->new(): Mandatory parameter $_ not provided.") unless $params->{$_}; | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 40 | } | ||||||||||||||
| 41 | |||||||||||||||
| 42 | my $self = { | ||||||||||||||
| 43 | 0 | api => $params->{'API'}, | |||||||||||||
| 44 | }; | ||||||||||||||
| 45 | |||||||||||||||
| 46 | 0 | return bless($self, $class); | |||||||||||||
| 47 | } | ||||||||||||||
| 48 | |||||||||||||||
| 49 | =head2 $ns->api() | ||||||||||||||
| 50 | |||||||||||||||
| 51 | Accessor for internal API object. | ||||||||||||||
| 52 | |||||||||||||||
| 53 | =cut | ||||||||||||||
| 54 | |||||||||||||||
| 55 | 0 | ▶ | sub api { | ||||||||||||
|
Subroutine
api: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||
| 56 | 0 | return $_[0]->{api}; | |||||||||||||
| 57 | } | ||||||||||||||
| 58 | |||||||||||||||
| 59 | 0 | ▶ | sub _argparse { | ||||||||||||
|
Subroutine
_argparse: not called CC=3 SCAR=24.8
| |||||||||||||||
| 60 | 0 | my $hashref; | |||||||||||||
| 61 | 0 | ▶ | if (@_ % 2 == 0) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 62 | 0 | $hashref = { @_ } | |||||||||||||
| 63 | } elsif (ref($_[0]) eq 'HASH') { | ||||||||||||||
| 64 | 0 | $hashref = \%{$_[0]}; | |||||||||||||
| 65 | } | ||||||||||||||
| 66 | 0 | return $hashref; | |||||||||||||
| 67 | } | ||||||||||||||
| 68 | |||||||||||||||
| 69 | =head1 AUTHOR | ||||||||||||||
| 70 | |||||||||||||||
| 71 | Tim Wilde, C<< <twilde at cpan.org> >> | ||||||||||||||
| 72 | |||||||||||||||
| 73 | =head1 BUGS | ||||||||||||||
| 74 | |||||||||||||||
| 75 | Please report any bugs or feature requests to C<bug-www-namecheap-api at rt.cpan.org>, or through | ||||||||||||||
| 76 | the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Namecheap-API>. I will be notified, and then you'll | ||||||||||||||
| 77 | automatically be notified of progress on your bug as I make changes. | ||||||||||||||
| 78 | |||||||||||||||
| 79 | |||||||||||||||
| 80 | |||||||||||||||
| 81 | =head1 SUPPORT | ||||||||||||||
| 82 | |||||||||||||||
| 83 | You can find documentation for this module with the perldoc command. | ||||||||||||||
| 84 | |||||||||||||||
| 85 | perldoc WWW::Namecheap::NS | ||||||||||||||
| 86 | |||||||||||||||
| 87 | |||||||||||||||
| 88 | You can also look for information at: | ||||||||||||||
| 89 | |||||||||||||||
| 90 | =over 4 | ||||||||||||||
| 91 | |||||||||||||||
| 92 | =item * RT: CPAN's request tracker (report bugs here) | ||||||||||||||
| 93 | |||||||||||||||
| 94 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Namecheap-API> | ||||||||||||||
| 95 | |||||||||||||||
| 96 | =item * AnnoCPAN: Annotated CPAN documentation | ||||||||||||||
| 97 | |||||||||||||||
| 98 | L<http://annocpan.org/dist/WWW-Namecheap-API> | ||||||||||||||
| 99 | |||||||||||||||
| 100 | =item * CPAN Ratings | ||||||||||||||
| 101 | |||||||||||||||
| 102 | L<http://cpanratings.perl.org/d/WWW-Namecheap-API> | ||||||||||||||
| 103 | |||||||||||||||
| 104 | =item * Search CPAN | ||||||||||||||
| 105 | |||||||||||||||
| 106 | L<http://search.cpan.org/dist/WWW-Namecheap-API/> | ||||||||||||||
| 107 | |||||||||||||||
| 108 | =back | ||||||||||||||
| 109 | |||||||||||||||
| 110 | |||||||||||||||
| 111 | =head1 ACKNOWLEDGEMENTS | ||||||||||||||
| 112 | |||||||||||||||
| 113 | |||||||||||||||
| 114 | =head1 LICENSE AND COPYRIGHT | ||||||||||||||
| 115 | |||||||||||||||
| 116 | Copyright 2011 Tim Wilde. | ||||||||||||||
| 117 | |||||||||||||||
| 118 | This program is free software; you can redistribute it and/or modify it | ||||||||||||||
| 119 | under the terms of either: the GNU General Public License as published | ||||||||||||||
| 120 | by the Free Software Foundation; or the Artistic License. | ||||||||||||||
| 121 | |||||||||||||||
| 122 | See http://dev.perl.org/licenses/ for more information. | ||||||||||||||
| 123 | |||||||||||||||
| 124 | |||||||||||||||
| 125 | =cut | ||||||||||||||
| 126 | |||||||||||||||
| 127 | 2 | 1; # End of WWW::Namecheap::NS | |||||||||||||