| 1 | package Net::SecurityCenter::API::File; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use parent 'Net::SecurityCenter::Base'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 2 | ▶ | use Net::SecurityCenter::Utils qw(:all); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 2 | our $VERSION = '0.310'; | |||||||||
| 13 | |||||||||||
| 14 | #------------------------------------------------------------------------------- | ||||||||||
| 15 | # METHODS | ||||||||||
| 16 | #------------------------------------------------------------------------------- | ||||||||||
| 17 | |||||||||||
| 18 | sub upload { | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | my ( $self, $file ) = @_; | ||||||||
|
Subroutine
upload: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 21 | |||||||||||
| 22 | 0 | ▶ | ( @_ == 2 ) or croak( 'Usage: ' . __PACKAGE__ . '->upload( $FILE )' ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | 0 | my $response = $self->client->upload($file); | |||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | return if ( !$response ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | 0 | return $response->{filename}; | |||||||||
| 28 | |||||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | #------------------------------------------------------------------------------- | ||||||||||
| 32 | |||||||||||
| 33 | sub clear { | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | my ( $self, $file ) = @_; | ||||||||
|
Subroutine
clear: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | ▶ | ( @_ == 2 ) or croak( 'Usage: ' . __PACKAGE__ . '->clear( $FILE )' ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | |||||||||||
| 39 | 0 | my $response = $self->client->post( '/file/clear', { filename => $file } ); | |||||||||
| 40 | |||||||||||
| 41 | 0 | ▶ | return if ( !$response ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 42 | 0 | return 1; | |||||||||
| 43 | |||||||||||
| 44 | } | ||||||||||
| 45 | |||||||||||
| 46 | #------------------------------------------------------------------------------- | ||||||||||
| 47 | |||||||||||
| 48 | 2 | 1; | |||||||||
| 49 | |||||||||||
| 50 | __END__ | ||||||||||