sub new {
my $class = shift;
- bless { ( @_ > 1 ) ? @_ : %{ $_[0] } }, $class;
+ bless { ( @_ > 1 ) ? @_ : %{ $_[0] } }, $class;
}
sub AUTOLOAD {
my $self = shift;
( my $key ) = ( our $AUTOLOAD =~ m/([^:]*)$/ );
- $self->_accessor( $key, @_ );
+ $self->_accessor( $key, @_ );
}
sub id {
- my $self = shift;
- $self->_accessor( "id", @_ );
+ my $self = shift;
+ $self->_accessor( "id", @_ );
}
sub store {
- my $self = shift;
- ref $self || $self;
+ my $self = shift;
+ ref $self || $self;
}
sub _accessor {
- my $self = shift;
- my $key = shift;
+ my $self = shift;
+ my $key = shift;
if (@_) {
my $arr = $self->{__hash_obj_key_is_array}{$key} = @_ > 1;
my $cursor = \%features;
+ return 1 if @spec == 1 and exists $self->{ $spec[0] };
+
# traverse the feature list,
for (@spec) {
die "bad feature spec: @spec"
}
sub from_session {
- my ( $self, $c, $user ) = @_;
- $user;
+ my ( $self, $c, $user ) = @_;
+ $user;
}
__PACKAGE__;