App-Framework
view release on metacpan or search on metacpan
lib/App/Framework/Core.pm view on Meta::CPAN
686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735$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
556557558559560561562563564565566567568569570571572573574575576
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 )