| 1 | package Tie::Filter::Scalar; | ||
| 2 | |||
| 3 | 1 | ▶ | use 5.008; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | ▶ | use Tie::Filter; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 1 | our $VERSION = '1.02'; | |
| 10 | |||
| 11 | =head1 NAME | ||
| 12 | |||
| 13 | Tie::Filter::Scalar - Tie a facade around a scalar | ||
| 14 | |||
| 15 | =head1 DESCRIPTION | ||
| 16 | |||
| 17 | Don't use this package directly. Instead, see L<Tie::Filter>. | ||
| 18 | |||
| 19 | =cut | ||
| 20 | |||
| 21 | 1 | ▶ | sub TIESCALAR { |
|
Subroutine
TIESCALAR: called CC=1 SCAR=0.0
| |||
| 22 | 1 | my ($class, $scalar, %args) = @_; | |
| 23 | 1 | $args{WRAP} = $scalar; | |
| 24 | 1 | return bless \%args, $class; | |
| 25 | } | ||
| 26 | |||
| 27 | 1 | ▶ | sub FETCH { |
|
Subroutine
FETCH: called CC=1 SCAR=0.0
| |||
| 28 | 1 | my $self = shift; | |
| 29 | 1 | Tie::Filter::_filter($$self{FETCH}, ${$$self{WRAP}}); | |
| 30 | } | ||
| 31 | |||
| 32 | 1 | ▶ | sub STORE { |
|
Subroutine
STORE: called CC=1 SCAR=0.0
| |||
| 33 | 1 | my $self = shift; | |
| 34 | 1 | my $value = shift; | |
| 35 | 1 | ${$$self{WRAP}} = Tie::Filter::_filter($$self{STORE}, $value); | |
| 36 | } | ||
| 37 | |||
| 38 | 0 | ▶ | sub UNTIE { } |
|
Subroutine
UNTIE: not called CC=1 SCAR=0.0
| |||
| 39 | |||
| 40 | 0 | ▶ | sub DESTROY { } |
|
Subroutine
DESTROY: not called CC=1 SCAR=0.0
| |||
| 41 | |||
| 42 | =head1 SEE ALSO | ||
| 43 | |||
| 44 | L<perltie>, L<Tie::Filter> | ||
| 45 | |||
| 46 | =head1 AUTHOR | ||
| 47 | |||
| 48 | Andrew Sterling Hanenkamp, <sterling@hanenkamp.com> | ||
| 49 | |||
| 50 | =head1 LICENSE AND COPYRIGHT | ||
| 51 | |||
| 52 | Copyright 2003 Andrew Sterling Hanenkamp. All Rights Reserved. This library is | ||
| 53 | free software; you can redistribute it and/or modify it under the same terms as | ||
| 54 | Perl itself. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | 1 | 1 | |
| 59 | |||