File: 005_moose_and_threads.t

package info (click to toggle)
libmoose-perl 1.09-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,004 kB
  • ctags: 1,472
  • sloc: perl: 25,387; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 789 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl

use strict;
use warnings;

use Test::More;
use Test::Exception;


=pod

See this for some details:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476579

Here is the basic test case, it segfaults, so I am going
to leave it commented out. Basically it seems that there
is some bad interaction between the ??{} construct that
is used in the "parser" for type definitions and threading
so probably the fix would involve removing the ??{} usage
for something else.

use threads;

{
    package Foo;
    use Moose;
    has "bar" => (is => 'rw', isa => "Str | Num");
}

my $thr = threads->create(sub {});
$thr->join();

=cut

{
    local $TODO = 'This is just a stub for the test, see the POD';
    fail('Moose type constraints and threads dont get along');
}

done_testing;