1 package SGN
::View
::Mason
::CrossReference
;
8 our @EXPORT_OK = qw( resolve_xref_component );
10 sub resolve_xref_component
{
11 my ( $m, $feature, $comp_pattern ) = @_;
13 for my $fname ( $feature->feature_name, 'default' ) {
14 my $comp = $comp_pattern;
15 $comp =~ s/(?<!%)%f/$fname/g;
17 return $comp if $m->comp_exists( $comp );
20 croak
"Cannot find Mason component for pattern '$comp_pattern' sitefeature ".$feature->feature_name;