| 1 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Tiny::OpenSSL::Role::Entity; | ||||||||||
| 5 | |||||||||||
| 6 | # ABSTRACT: Provides common tasks for Tiny::OpenSSL objects. | ||||||||||
| 7 | 4 | our $VERSION = '0.1.1'; # VERSION | |||||||||
| 8 | |||||||||||
| 9 | 4 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 4 | ▶ | use Types::Standard qw( Str InstanceOf ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 4 | ▶ | use Path::Tiny; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 4 | has ascii => ( is => 'rw', isa => Str ); | |||||||||
| 14 | |||||||||||
| 15 | has file => ( | ||||||||||
| 16 | is => 'rw', | ||||||||||
| 17 | isa => InstanceOf ['Path::Tiny'], | ||||||||||
| 18 | 10 | ▶ | default => sub { return Path::Tiny->tempfile; } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 4 | ); | |||||||||
| 20 | |||||||||||
| 21 | sub write { | ||||||||||
| 22 | 1 | ▶ | my $self = shift; | ||||||||
|
Subroutine
write: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | if ( $self->file ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 1 | $self->file->spew( $self->ascii ); | |||||||||
| 26 | } | ||||||||||
| 27 | |||||||||||
| 28 | 1 | return 1; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 4 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||