Acme-CPANModulesUtil-FeatureMatrix
view release on metacpan or search on metacpan
lib/Acme/CPANModulesUtil/FeatureMatrix.pm view on Meta::CPAN
$note_text .= Markdown::To::POD::markdown_to_pod($fvalue0->{description}) . "\n\n";
}
if ($this_note_num = $note_nums{$note_text}) {
# reuse the same text from another note
} else {
$note_num++;
push @notes, "=item $note_num. $note_text\n\n";
$note_nums{$note_text} = $this_note_num = $note_num;
}
}
push @row, $fvalue . ($has_note ? " *$this_note_num)" : "");
}
push @rows, \@row;
}
}
my $res = Text::Table::Any::table(
rows => \@rows,
header_row => 1,
); $res =~ s/^/ /gm;
if (@notes) {
$res .= join(
"",
"\n\nNotes:\n\n=over\n\n", @notes, "=back\n\n",
);
}
[200, "OK", $res];
}
1;
# ABSTRACT: Draw features matrix of modules in an Acme::CPANModules::* list
__END__
=pod
=encoding UTF-8
=head1 NAME
Acme::CPANModulesUtil::FeatureMatrix - Draw features matrix of modules in an Acme::CPANModules::* list
=head1 VERSION
This document describes version 0.005 of Acme::CPANModulesUtil::FeatureMatrix (from Perl distribution Acme-CPANModulesUtil-FeatureMatrix), released on 2021-07-29.
=head1 FUNCTIONS
=head2 draw_feature_matrix
Usage:
draw_feature_matrix(%args) -> [$status_code, $reason, $payload, \%result_meta]
Draw features matrix of modules in an Acme::CPANModules::* list.
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
=over 4
=item * B<cpanmodule>* => I<perl::modname>
Name of Acme::CPANModules::* module, without the prefix.
=back
Returns an enveloped result (an array).
First element ($status_code) is an integer containing HTTP-like status code
(200 means OK, 4xx caller error, 5xx function error). Second element
($reason) is a string containing error message, or something like "OK" if status is
200. Third element ($payload) is the actual result, but usually not present when enveloped result is an error response ($status_code is not 2xx). Fourth
element (%result_meta) is called result metadata and is optional, a hash
that contains extra information, much like how HTTP response headers provide additional metadata.
Return value: (any)
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metacpan.org/release/Acme-CPANModulesUtil-FeatureMatrix>.
=head1 SOURCE
Source repository is at L<https://github.com/perlancar/perl-Acme-CPANModulesUtil-FeatureMatrix>.
=head1 BUGS
Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Acme-CPANModulesUtil-FeatureMatrix>
When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.
=head1 SEE ALSO
C<Acme::CPANModules>
=head1 AUTHOR
perlancar <perlancar@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2021, 2019 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
( run in 0.697 second using v1.01-cache-2.11-cpan-39bf76dae61 )