Acme-ReturnValue

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

# NAME

Acme::ReturnValue - report interesting return values

# VERSION

version 1.004

# SYNOPSIS

    use Acme::ReturnValue;
    my $rvs = Acme::ReturnValue->new;
    $rvs->in_INC;
    foreach (@{$rvs->interesting}) {
        say $_->{package} . ' returns ' . $_->{value};
    }

# DESCRIPTION

`Acme::ReturnValue` will list 'interesting' return values of modules.
'Interesting' means something other than '1'.

See [https://returnvalues.plix.at](https://returnvalues.plix.at) for the results of running Acme::ReturnValue on the whole CPAN.

## METHODS

### run

run from the commandline (via `acme_returnvalue.pl`

### waste\_some\_cycles

    my $data = $arv->waste_some_cycles( '/some/module.pm' );

`waste_some_cycles` parses the passed in file using PPI. It tries to
get the last statement and extract it's value.

`waste_some_cycles` returns a hash with following keys

- file

    The file

- package

    The package defintion (the first one encountered in the file

- value

    The return value of that file

`waste_some_cycles` will also put this data structure into
[interesting](https://metacpan.org/pod/interesting) or [boring](https://metacpan.org/pod/boring).

You might want to pack calls to `waste_some_cycles` into an `eval`
because PPI dies on parse errors.

#### \_is\_code

Stolen directly from Perl::Critic::Policy::Modules::RequireEndWithOne
as suggested by Chris Dolan.

Thanks!

### in\_CPAN

Analyse CPAN. Needs a local CPAN mirror

### in\_INC

    $arv->in_INC;

Collect return values from all `*.pm` files in `@INC`.

### in\_dir



( run in 1.943 second using v1.01-cache-2.11-cpan-d06a3f9ecfd )