| 1 | package IRC::Indexer::Output::JSON; | ||
| 2 | |||
| 3 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 4 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 4 | ▶ | use JSON::XS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 4 | require IRC::Indexer::Output; | |
| 8 | 4 | our @ISA = qw/IRC::Indexer::Output/; | |
| 9 | |||
| 10 | 2 | ▶ | sub dump { |
|
Subroutine
dump: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | 2 | my ($self) = @_; | |
| 12 | $self->{Output} = JSON::XS->new->utf8(1)->indent->encode( | ||
| 13 | $self->{Input} | ||
| 14 | 2 | ); | |
| 15 | 2 | $self->SUPER::dump(); | |
| 16 | } | ||
| 17 | |||
| 18 | 0 | ▶ | sub write { |
|
Subroutine
write: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 19 | 0 | my ($self, $path) = @_; | |
| 20 | |||
| 21 | $self->{Output} = JSON::XS->new->utf8(1)->indent->encode( | ||
| 22 | $self->{Input} | ||
| 23 | 0 | ) . "\n" ; | |
| 24 | |||
| 25 | 0 | $self->SUPER::write($path); | |
| 26 | } | ||
| 27 | |||
| 28 | 4 | 1; | |
| 29 | __END__ | ||