4 use namespace
::autoclean
;
9 documentation
=> 'our context class',
12 does
=> 'SGN::Role::Site::SiteFeatures',
17 documentation
=> 'boolean flag, whether this feature is enabled',
26 my $name = ref( $self ) || $self;
31 has
'description' => (
32 documentation
=> <<'',
33 short plaintext description of the feature
, user
-visible
. May be used
in default views
for crossreferences
and so forth
.
37 default => sub { ucfirst shift->feature_name },
40 has
'feature_dir' => (
42 isa
=> 'Path::Class::Dir',
45 ); sub _build_feature_dir
{
47 return $self->context->path_to( 'features', $self->feature_name )->stringify;
52 return File
::Spec
->catfile( $self->feature_dir, @_ );
57 return $self->context->tempfiles_base->subdir( 'features', $self->feature_name );
60 # called on application restart
64 # return one or more SGN::SiteFeature::CrossReference objects for the
65 # given input (input can be anything) or nothing if the query is not
66 # handled by this Feature. note that a CrossReference object should
67 # always be returned, it just might be empty
75 __PACKAGE__
->meta->make_immutable;