comparison Lib/IMPL/declare.pm @ 209:a8db61d0ed33

IMPL::Class::Meta refactoring
author cin
date Mon, 28 May 2012 19:58:56 +0400
parents 2ffe6f661605
children 2b9b55cfb79b
comparison
equal deleted inserted replaced
208:3d433a977e3b 209:a8db61d0ed33
1 package IMPL::declare; 1 package IMPL::declare;
2 use strict; 2 use strict;
3 3
4 use Scalar::Util qw(set_prototype); 4 use Scalar::Util qw(set_prototype);
5 use Carp qw(carp);
5 6
6 sub import { 7 sub import {
7 my ($self,$args) = @_; 8 my ($self,$args) = @_;
8 9
9 return unless $args; 10 return unless $args;
28 29
29 my %ctor; 30 my %ctor;
30 my @isa; 31 my @isa;
31 32
32 if (ref $base eq 'ARRAY') { 33 if (ref $base eq 'ARRAY') {
34 carp("will be changed in next version");
33 @isa = map _require($_), @$base if @$base; 35 @isa = map _require($_), @$base if @$base;
34 } elsif (ref $base eq 'HASH' ) { 36 } elsif (ref $base eq 'HASH' ) {
35 while ( my ($class,$mapper) = each %$base ) { 37 while ( my ($class,$mapper) = each %$base ) {
36 $class = $aliases->{$class} || _require($class); 38 $class = $aliases->{$class} || _require($class);
37 39