Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 35828
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: stevan.little [...] gmail.com
Requestors: rkitover [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.44
Fixed in: (no value)



Subject: immutable constructors don't call triggers
New test attached: t/300_immutable/007_immutable_trigger_from_constructor.t -- Rafael
Subject: 007_immutable_trigger_from_constructor.t
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 2; BEGIN { use_ok('Moose'); } { package AClass; use Moose; has 'foo' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub { die "Pulling the trigger\n" }); __PACKAGE__->meta->make_immutable; no Moose; } eval { AClass->new(foo => 'bar') }; like ($@, qr/^Pulling the trigger/, "trigger from immutable constructor");
This has been fixed in the latest version of Moose (0.45) now available on CPAN.