Changeset 25463 for lang/perl/Shika
- Timestamp:
- 11/30/08 22:58:52 (4 years ago)
- Location:
- lang/perl/Shika/trunk/lib
- Files:
-
- 3 modified
-
Shika.pm (modified) (1 diff)
-
Shika/Role.pm (modified) (1 diff)
-
Shika/Util/TypeConstraints.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Shika/trunk/lib/Shika.pm
r25459 r25463 318 318 # copy subtype/coerce 319 319 require Shika::Util::TypeConstraints; 320 Shika::Util::TypeConstraints::copy_types($role, $target );320 Shika::Util::TypeConstraints::copy_types($role, $target, '-all'); 321 321 322 322 push @{ $target->meta->{role} }, $role; -
lang/perl/Shika/trunk/lib/Shika/Role.pm
r25459 r25463 57 57 # copy subtype/coerce 58 58 require Shika::Util::TypeConstraints; 59 Shika::Util::TypeConstraints::copy_types($role, $target );59 Shika::Util::TypeConstraints::copy_types($role, $target, '-all'); 60 60 61 61 push @{ $target->meta->{role} }, $role; -
lang/perl/Shika/trunk/lib/Shika/Util/TypeConstraints.pm
r25459 r25463 33 33 return unless exists $SUBTYPE->{$class} && exists $COERCE->{$class}; 34 34 my $pkg = caller(1); 35 return unless @types; 35 36 copy_types($class, $pkg, @types); 36 37 } … … 40 41 $SUBTYPE->{$target} ||= +{}; 41 42 $COERCE->{$target} ||= +{}; 43 44 if ($types[0] eq '-all') { 45 @types = (); 46 my %cache; 47 for my $type (%{ $SUBTYPE->{$src} }, %{ $COERCE->{$src} }) { 48 next if $cache{$type}++; 49 push @types, $type; 50 } 51 } 42 52 43 53 for my $type (@types) {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)