File: global-destruction-helper.pl

package info (click to toggle)
libmoo-perl 2.002005-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 856 kB
  • ctags: 192
  • sloc: perl: 2,561; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 246 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Moo::_strictures;
use POSIX ();

my $exit_value = shift;

BEGIN {
    package Bar;
    use Moo;

    sub DEMOLISH {
        my ($self, $gd) = @_;
        if ($gd) {
          POSIX::_exit($exit_value);
        }
    }
}

our $bar = Bar->new;