| 1 | package Data::Stream::Bulk::FileHandle; | ||||||||||
| 2 | 2 | ▶ | BEGIN { | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | $Data::Stream::Bulk::FileHandle::AUTHORITY = 'cpan:NUFFIN'; | |||||||||
| 4 | } | ||||||||||
| 5 | { | ||||||||||
| 6 | 2 | $Data::Stream::Bulk::FileHandle::VERSION = '0.11'; | |||||||||
| 7 | } | ||||||||||
| 8 | 2 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | # ABSTRACT: read lines from a filehandle | ||||||||||
| 10 | |||||||||||
| 11 | 2 | ▶ | use namespace::clean -except => 'meta'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 2 | ▶ | use IO::Handle; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 2 | with 'Data::Stream::Bulk::DoneFlag'; | |||||||||
| 16 | |||||||||||
| 17 | 2 | has filehandle => ( | |||||||||
| 18 | is => 'ro', | ||||||||||
| 19 | isa => 'FileHandle', | ||||||||||
| 20 | required => 1, | ||||||||||
| 21 | ); | ||||||||||
| 22 | |||||||||||
| 23 | 5 | ▶ | sub get_more { | ||||||||
|
Subroutine
get_more: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 24 | 5 | my $self = shift; | |||||||||
| 25 | |||||||||||
| 26 | 5 | my $line = $self->filehandle->getline; | |||||||||
| 27 | 5 | ▶ | return unless defined $line; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | 4 | return [ $line ]; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | 2 | 1; | |||||||||
| 35 | |||||||||||
| 36 | __END__ | ||||||||||