Group
Extension

Matches 1

App-LastStats ( D/DA/DAVECROSS/App-LastStats-0.0.10.tar.gz, DAVECROSS, 2025; MetaCPAN )
App-LastStats/lib/App/LastStats.pm ( view source; MetaCPAN )
if $^V >= v5.38, warnings => 'experimental::class';

  use Net::LastFM;
  use Getopt::Long;
  use JSON;

  our $VERSION = '0.0.10';

  field $username   :param = 'davorg';
  field $period     :param =
artists;

  field $renderer = {
    text => \&render_text,
    html => \&render_html,
    json => \&render_json,
  };

  method run {
    GetOptions(
      'user=s'      => \$username,
      'period=s
  method render_json {
    my $pos = 1;

    my @data = map { {
      position => $pos++,
      name     => $_->{name},
      count    => $_->{playcount},
    } } @artists;
    say JSON->new->canonica

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.