App-Framework

 view release on metacpan or  search on metacpan

lib/App/Framework/Core.pm  view on Meta::CPAN

686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
$this->_dbg_prt(["install_features()", \@features, "features args=", $feature_args_href]) ;
$class_debug = $this->debug if $this->debug >= 5 ;
 
         
        ## Now try to install them
        foreach my $feature (@features)
        {
                my $feature_args = $feature_args_href->{$feature} || "" ;
                 
                my $loaded ;
                my $feature_guess = ucfirst(lc($feature)) ;
                 
                ## skip if already loaded
                if (exists($features_href->{$feature}) || exists($features_href->{$feature_guess}))
                {
                        ## Just need to see if we've got any new args
                        foreach my $feat ($feature, $feature_guess)
                        {
                                if (exists($feature_args_href->{$feat}))
                                {
                                        ## override args
                                        my $feature_obj = $features_href->{$feature}{'object'} ;
                                        $feature_obj->feature_args($feature_args_href->{$feat}) ;
                                }                                              
                        }
                        next ;
                }
 
                # build list of module names to attempt. If personality name is set, try looking for feature
                # under personality subdir first. This allows for personality override of feature (e.g. POE:app overrides Script:app)
                #
                my @tries ;
                my $personality = $this->personality ;
                my $root = "App::Framework::Feature" ;
                if ($personality)
                {
                        push @tries, "${root}::${personality}::$feature" ;
                        push @tries, "${root}::${personality}::$feature_guess" ;
                }
                push @tries, "${root}::$feature" ;
                push @tries, "${root}::$feature_guess" ;
                 
                foreach my $module (@tries)
                {
                        if ($this->dynamic_load($module))
                        {
                                $loaded = $module ;
                                last ;
                        }
                }

lib/App/Framework/Feature/Pod.pm  view on Meta::CPAN

556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
                        else
                        {
                                $synopsis .= 'B<' ;
                        }
                         
                        $synopsis .= "{$arg_name$type$suffix}" ;
                        $synopsis .= ']' if $arg_entry_href->{'optional'} ;
                        $synopsis .= '> ' ;
                }
                 
                # set our best guess
                $this->app->synopsis($synopsis) ;
        }      
 
        return $synopsis ;
}
 
 
 
# ============================================================================================
# PRIVATE METHODS



( run in 0.290 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )