File: 032_universal_methods.t

package info (click to toggle)
libclass-mop-perl 1.04-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,244 kB
  • ctags: 1,272
  • sloc: perl: 5,192; ansic: 241; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!perl

use strict;
use warnings;

# UNIVERSAL methods

use Test::More;
use Class::MOP;

my $meta_class = Class::MOP::Class->create_anon_class;

my @universal_methods = qw/isa can VERSION/;
push @universal_methods, 'DOES' if $] >= 5.010;

TODO: {
    local $TODO = 'UNIVERSAL methods should be available';

    for my $method ( @universal_methods ) {
       ok $meta_class->find_method_by_name($method), "has UNIVERSAL method $method";
    }
};

done_testing;