| 1 | 4 | ▶ | use strict; use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | package IO::All::String; | ||||||||||
| 3 | |||||||||||
| 4 | 4 | ▶ | use IO::All -base; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 4 | const type => 'string'; | |||||||||
| 7 | |||||||||||
| 8 | sub string_ref { | ||||||||||
| 9 | 5 | ▶ | my ($self, $ref) = @_; | ||||||||
|
Subroutine
string_ref: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 10 | |||||||||||
| 11 | 4 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 5 | ▶ | *$self->{ref} = $ref if exists $_[1]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | |||||||||||
| 14 | return *$self->{ref} | ||||||||||
| 15 | 5 | } | |||||||||
| 16 | |||||||||||
| 17 | sub string { | ||||||||||
| 18 | 2 | ▶ | my $self = shift; | ||||||||
|
Subroutine
string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 19 | 2 | bless $self, __PACKAGE__; | |||||||||
| 20 | 2 | $self->_init; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | sub open { | ||||||||||
| 24 | 2 | ▶ | my $self = shift; | ||||||||
|
Subroutine
open: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 25 | 2 | my $str = ''; | |||||||||
| 26 | 2 | my $ref = \$str; | |||||||||
| 27 | 2 | $self->string_ref($ref); | |||||||||
| 28 | 2 | open my $fh, '+<', $ref; | |||||||||
| 29 | 2 | $self->io_handle($fh); | |||||||||
| 30 | 2 | $self->_set_binmode; | |||||||||
| 31 | 2 | $self->is_open(1); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 4 | 1; | |||||||||