Fix a typo
[gitmo/Mouse.git] / t / 001_mouse / 002-warnings.t
CommitLineData
c3398f5b 1#!/usr/bin/env perl
2use Test::More tests => 1;
c3398f5b 3
a7f212f1 4# we used to use Test::Warn here but there's no point in adding three deps total
5# for this one easy test
6
7my @warnings;
8local $SIG{__WARN__} = sub {
9 push @warnings, "@_";
10};
11
12do {
c3398f5b 13 package Class;
14 use Mouse;
15
16 my $one = 1 + undef;
a7f212f1 17};
18
19like("@warnings", qr/^Use of uninitialized value/, 'using Mouse turns on warnings');
c3398f5b 20