| 1 | use strict; use warnings; | ||
| 2 | use version; | ||
| 3 | |||
| 4 | =head1 NAME | ||
| 5 | |||
| 6 | Term::ReadLine::Perl5::Tie | ||
| 7 | |||
| 8 | =head1 DESCRIPTION | ||
| 9 | |||
| 10 | Used by L<Term::ReadLine::Perl> to bind | ||
| 11 | I<%Term::ReadLine::Perl5::attribs> to their corresponding | ||
| 12 | I<%Term::ReadLine::readline> value in reading and setting those | ||
| 13 | attributes. | ||
| 14 | |||
| 15 | =head1 SEE ALSO | ||
| 16 | |||
| 17 | L<Term::ReadLine::Perl5> | ||
| 18 | |||
| 19 | =cut | ||
| 20 | package Term::ReadLine::Perl5::Tie; | ||
| 21 | |||
| 22 | # version might not be below other places in this routine | ||
| 23 | # no critic | ||
| 24 | our $VERSION = '1.43'; | ||
| 25 | |||
| 26 | sub TIEHASH { bless {} } | ||
| 27 | |||
| 28 | sub STORE { | ||
| 29 | my ($self, $name) = (shift, shift); | ||
| 30 | no strict; | ||
| 31 | no warnings 'once'; | ||
| 32 | $ {'Term::ReadLine::Perl5::readline::rl_' . $name} = shift; | ||
| 33 | } | ||
| 34 | |||
| 35 | sub FETCH { | ||
| 36 | my ($self, $name) = (shift, shift); | ||
| 37 | no strict; | ||
| 38 | $ {'Term::ReadLine::Perl5::readline::rl_' . $name}; | ||
| 39 | } | ||
| 40 | |||
| 41 | 1; |