File: scalar.t

package info (click to toggle)
libtie-simple-perl 1.04-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 144 kB
  • sloc: perl: 139; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 263 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# vim: set ft=perl :

use strict;
use Test::More tests => 2;
use Tie::Simple;

my $y = 'A';
tie my $x, 'Tie::Simple', \$y,
	FETCH => sub { my $a = shift; $$a },
	STORE => sub { my $a = shift; $$a = shift; };

is($x, 'A', 'FETCH');
$x = 'Z';
is($y, 'Z', 'STORE');