File: liftvar.t

package info (click to toggle)
libdevel-beginlift-perl 0.001003-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 156 kB
  • ctags: 101
  • sloc: perl: 1,092; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 331 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;
use Test::More 'no_plan';

sub foo { $_[0] = $_[1]; (); }

sub bar { is($_[0], 'yay', 'Var set ok by sub'); (); }

sub baz { () }

sub quux { is($_[0], 'w00t', 'Var set ok by ='); (); }

use Devel::BeginLift qw(foo bar baz quux);

foo(my $meep, 'yay');

bar($meep);

baz(my $lolz = 'w00t');

quux($lolz);