package main; my $default_hints; my $default_hinthash; my $default_warning_bits; BEGIN { $default_hints = $^H; $default_hinthash = { %^H }; $default_warning_bits = ${^WARNING_BITS}; } use strict; use warnings; # ABSTRACT: persists lexical hints across input lines use mop; =head1 SYNOPSIS ; .replyrc [Hints] =head1 DESCRIPTION This plugin persists the values of various compile time lexical hints between evaluated lines. This means, for instance, that entering a line like C at the Reply prompt will cause C to be enabled for all future lines (at least until C is given). =cut class Reply::Plugin::Hints extends Reply::Plugin { has $hints = $default_hints; has $hinthash = $default_hinthash; has $warning_bits = $default_warning_bits; method mangle_line ($line) { my $package = __PACKAGE__; return <($line, %args); $hints = $HINTS; $hinthash = $HINTHASH; $warning_bits = $WARNING_BITS; return @result; } } 1;