File: const.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 (15 lines) | stat: -rw-r--r-- 219 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use lib 't', 'lib';
use strict;
use warnings;

package XXX;
use Spiffy -base;
const foo => 42;

package main;
use Test::More tests => 3;

my $xxx = XXX->new;
is($xxx->foo, 42);
is($xxx->foo(69), 42);
is($xxx->foo, 42);