Help for this page

Select Code to Download


  1. or download this
    use strict;
    use UNIVERSAL 'isa';
    ...
    my $type_search = build_deep_sub( init => 'my $type = shift;', map => 
    +'grep isa( $_, $type ), ', guard => 'ref($_)' );
    
    my @loggers = $type_search->( 'Log', $target );
    
  2. or download this
      *{'deep_walk'} = build_deep_sub();
      *{'deep_map'} = build_deep_sub( init => 'my $test = shift;', map => 
    +'map $test->($_),' );
      *{'deep_grep'} = build_deep_sub( init => 'my $test = shift;', map =>
    + 'grep $test->($_),' );
      *{'deep_grep_refs'} = build_deep_sub( init => 'my $test = shift;', m
    +ap => 'grep $test->($_),', guard => 'ref($_)' );
      *{'deep_grep_type'} = build_deep_sub( init => 'my $type = shift;', m
    +ap => 'grep isa( $_, $type ), ', guard => 'ref($_)' );