Data-Show
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Data/Show.pm view on Meta::CPAN
# Resolve style options according to terminal background (i.e. dark or light)
for my $option (@opt{ grep /\A.+style\z/, keys %opt}) {
$option = [split /\s*,\s*/, $option]->[$IS_LIGHT_BG ? -1 : 0];
}
# Install Data::Show::Plugin base class as well...
$INC{'Data/Show/Plugin.pm'} = $INC{'Data/Show.pm'};
# Track lexical options...
$^H{'Data::Show/with'} = _load_plugin( $opt{with}, $file, $line,
$opt{warnings} ne 'off', $opt{fallback} );
$^H{'Data::Show/termwidth'} = $opt{termwidth};
$^H{'Data::Show/to'} = @OUTPUT_FH;
$^H{'Data::Show/style'} = @STYLE;
my $existing_as = $^H{'Data::Show/as'} // '(?!)';
$^H{'Data::Show/as'} = "$existing_as|$opt{as}";
push @OUTPUT_FH, $opt{to};
push @STYLE, { add_grid => $opt{grid},
mode => $opt{style},
map { m/(.+)style/ ? ($1 => $opt{$_}) : () } keys %opt
};
# Install the function...
no strict 'refs';
*{caller() . '::' . $opt{as}} = \&show;
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.985 second using v1.00-cache-2.02-grep-82fe00e-cpan-2ea8abbae53 )