File: threads.p

package info (click to toggle)
libwant-perl 0.23-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 168 kB
  • ctags: 10
  • sloc: perl: 167; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 327 bytes parent folder | download | duplicates (6)
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
use strict;
use warnings;

{
    package Foo;
    use Want;

    sub new { return (bless({}, shift)); }

    my $foo;

    sub foo :lvalue
    {
        my (@args) = Want::want('ASSIGN');
        $foo = $args[0];
        Want::lnoreturn;
        return;
    }

}

use threads;
my $obj = Foo->new();
$obj->foo() = 'bar';

# EOF