File: bugs.t

package info (click to toggle)
libuniversal-can-perl 1.20110613-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 148 kB
  • sloc: perl: 321; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 438 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;

use Test::More 'no_plan';    # tests => 8;

BEGIN { use_ok( 'UNIVERSAL::can', 'can' ) }

# valid use of isa() as static method on undefined class
{
    my $warnings = '';
    local $SIG{__WARN__} = sub { $warnings .= shift };
    use warnings 'UNIVERSAL::can';

    ok( !UnloadedClass->can('can'),
        'unloaded class should not be able to can()' );
    is( $warnings, '', '... and should not warn' );
}