App-colourhexdump

 view release on metacpan or  search on metacpan

lib/App/colourhexdump.pm  view on Meta::CPAN

use 5.006;    # our
use strict;
use warnings;

package App::colourhexdump;

our $VERSION = '1.000003';

# ABSTRACT: HexDump, but with character-class highlighting.

our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY

use Moose qw( has with );
use MooseX::Getopt::Dashes 0.37;
with qw( MooseX::Getopt::Dashes );

use Getopt::Long::Descriptive;
use Term::ANSIColor 3.00 qw( colorstrip );
use App::colourhexdump::Formatter;
use namespace::autoclean;

has colour_profile => (
  metaclass     => 'Getopt',
  isa           => 'Str',
  is            => 'rw',
  default       => 'DefaultColourProfile',
  cmd_aliases   => [qw/ C color-profile /],
  documentation => 'Backend to use for colour highlighting (DefaultColourProfile)',
);

has row_length => (
  metaclass     => 'Getopt',
  isa           => 'Int',
  is            => 'ro',
  default       => 32,
  cmd_aliases   => [qw/ r row /],
  documentation => 'Number of bytes per display row (32).',

);

has chunk_length => (
  metaclass     => 'Getopt',
  isa           => 'Int',
  is            => 'rw',
  default       => 4,
  cmd_aliases   => [qw/ x chunk /],
  documentation => 'Number of bytes per display hex display group (4).',
);

has _files => (
  metaclass     => 'Getopt',
  isa           => 'ArrayRef[Str]',
  is            => 'rw',
  default       => sub { [] },
  cmd_flag      => 'file',
  cmd_aliases   => [qw/ f /],
  documentation => 'Add a file to the list of files to process. \'-\' for STDIN.',

);

has 'show_file_prefix' => (
  metaclass     => 'Getopt',
  isa           => 'Bool',
  is            => 'rw',
  default       => 0,
  documentation => 'Enable printing the filename on the start of every line ( off ).',

);
has 'show_file_heading' => (
  metaclass     => 'Getopt',
  isa           => 'Bool',
  is            => 'rw',
  default       => 0,
  documentation => 'Enable printing the filename before the hexdump output. ( off ).',
);
has 'colour' => (
  metaclass     => 'Getopt',
  isa           => 'Bool',
  is            => 'rw',
  default       => 1,



( run in 0.800 second using v1.01-cache-2.11-cpan-5a3173703d6 )