Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/usr/share/doc/perl-Moose/t/metaclasses/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/doc/perl-Moose/t/metaclasses/new_object_BUILD.t
use strict;
use warnings;
use Test::More;

my $called;
{
    package Foo;
    use Moose;

    sub BUILD { $called++ }
}

Foo->new;
is($called, 1, "BUILD called from ->new");
$called = 0;
Foo->meta->new_object;
is($called, 1, "BUILD called from ->meta->new_object");
Foo->new({__no_BUILD__ => 1});
is($called, 1, "BUILD not called from ->new with __no_BUILD__");
Foo->meta->new_object({__no_BUILD__ => 1});
is($called, 1, "BUILD not called from ->meta->new_object with __no_BUILD__");

done_testing;

Hry