File: field.t

package info (click to toggle)
libspiffy-perl 0.21-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 256 kB
  • ctags: 99
  • sloc: perl: 1,067; makefile: 50
file content (21 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use lib 't', 'lib';
use strict;
use warnings;
use Spiffy ();

package Bar;

package Foo;
use base 'Spiffy';
sub new {
    my $self = super;
    field -package => 'Bar', 'xxx';
}

use Test::More tests => 4;

Foo->new;
ok(not defined $Foo::{-package});
ok(not defined &Foo::Bar);
ok(not defined &Foo::xxx);
ok(defined &Bar::xxx);