NAME

Data::AnyXfer::Role::Count - role for counting transfers

SYNOPSIS

package MyPackage;

use Moo;
use MooX::Types::MooseLike::Base qw(:all);

extends 'Data::AnyXfer';

...

around 'transform' => sub {
  my ( $orig, $self, $res ) = @_;
  ...
};

with 'Data::AnyXfer::Role::Count';

DESCRIPTION

This role counts transferred records.

Note that you must include if after you have modified the transform method.

ATTRIBUTES

transfer_count

This is the number of transferred records.

METHODS

transform

The transform method is modified to increment the "transfer_count" when the returned record is not false.

COPYRIGHT

This software is copyright (c) 2019, Anthony Lucas.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.