File: Import.t

package info (click to toggle)
libchild-perl 0.010-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 132 kB
  • ctags: 49
  • sloc: perl: 325; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 400 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
#!/usr/bin/perl;
use strict;
use warnings;

use Test::More 0.88;
our $CLASS = 'Child';
require_ok( $CLASS );

$CLASS->import();
ok( ! __PACKAGE__->can('child'), "No export by default" );

$CLASS->import('child');
can_ok( __PACKAGE__, 'child' );
my $one = child( sub { 1 });
ok( !$one->ipc, "no ipc by default" );

$one = child( sub { 1 }, pipe => 1 );
ok( $one->ipc, "ipc by param" );

done_testing;