CLI-Dispatch

 view release on metacpan or  search on metacpan

lib/CLI/Dispatch/Command.pm  view on Meta::CPAN

      my ($self, @args) = @_;

      die $self->usage(1) unless @args;

      # this message will be printed when "verbose" option is set
      $self->log( info => 'going to convert encoding' );

      # debug message will be printed only when "debug" option is set
      $self->log( debug => 'going to convert encoding' );

      my $decoded = decode( $self->option('from'), $args[0] );
      print encode( $self->option('to'), $decoded );
    }

    1;

    __END__

    =head1 NAME

    MyScript::Convert - this will be shown in a command list



( run in 0.325 second using v1.01-cache-2.11-cpan-26ccb49234f )