| App-Hachero documentation | view source | Contained in the App-Hachero distribution. |
App::Hachero::Result - represents a series of result of App::Hachero
my $r = App::Hachero::Result->new;
$r->push(
{
'some_key' => 'some_value',
'another_key' => 'another_value',
}
);
my @result = $r->values;
A class to store analyzed data from Hachero. You can override this result class in your analyze plugin class like this:
package App::Hachero::Plugin::Analyze::MyAnalyzer;
use base 'App::Hachero::Plugin::Base';
sub analyze : Hook {
my ($self, $context) = @_;
$context->result->{MyAnalyzer} = App::Hachero::Result::MyAnalyzer->new;
$context->result->{MyAnalizer}->push(
{
mykey => 'hoo',
}
);
}
package App::Hachero::Result::MyAnalyzer;
use base 'App::Hachero::Result';
__PACKAGE__->mk_classdata('primary' => [qw(mykey)]);
1;
You need to specify 'primary' arrayref classdata in your subclass.
constructor.
pushes new data hashref to the result and counts up the data.
returns data array of this result.
sorts data array for values method. you can override this method for your result class.
returns md5_hex key for the result data.
Takaaki Mizuno <cpan@takaaki.info>
Nobuo Danjou <nobuo.danjou@gmail.com>
| App-Hachero documentation | view source | Contained in the App-Hachero distribution. |