Squatting
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Squatting/H.pm view on Meta::CPAN
use strict;
use warnings;
use Clone;
our $AUTOLOAD;
# Squatting::H->new(\%attributes) -- constructor
sub new {
my ($class, $opts) = @_;
$opts ||= {};
CORE::bless { %$opts } => $class;
}
# Squatting::H->bless(\%attributes) -- like new() but directly bless $opts instead of making a shallow copy.
sub bless {
my ($class, $opts) = @_;
$opts ||= {};
CORE::bless $opts => $class;
}
# $object->extend(\%attributes) -- extend keys and values of another hashref into $self
sub extend {
my ($self, $extend) = @_;
for (keys %$extend) {
$self->{$_} = $extend->{$_};
}
$self;
}
lib/Squatting/View.pm view on Meta::CPAN
#use strict;
#use warnings;
#no warnings 'redefine';
#our $AUTOLOAD;
# constructor
sub new {
my $class = shift;
my $name = shift;
bless { name => $name, @_ } => $class;
}
# name of view
sub name : lvalue {
$_[0]->{name};
}
# name of view
sub headers : lvalue {
$_[0]->{headers};
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.404 second using v1.00-cache-2.02-grep-82fe00e-cpan-9f2165ba459b )