our
$VERSION
=
'CPAN-0.08'
;
my
$data
= {};
$attr
= {};
sub
new($$) {
my
(
$data
,
$attribues
) =
shift
;
$this
->data =
$data
;
$this
->attr =
$attributes
;
}
sub
getAttr($) {
my
$name
=
shift
;
return
( isset(
$this::attr
[
$name
] ) ) ?
$this::attr
[
$name
] : NULL;
}
sub
hasAttr($) {
my
$name
=
shift
;
return
( isset(
$this::attr
[
$name
] ) ) ? TRUE : FALSE;
}
sub
getAttributes() {
return
$this::attr
;
}
sub
offsetSet($$) {
my
(
$offset
,
$value
) =
shift
;
$this::data
[
$offset
] =
$value
;
}
sub
offsetExists($) {
my
$offset
=
shift
;
return
isset(
$this::data
[
$offset
] );
}
sub
offsetUnset($) {
my
$offset
=
shift
;
unset(
$this::data
[
$offset
] );
}
sub
offsetGet($) {
my
$offset
=
shift
;
return
isset(
$this::data
[
$offset
] ) ?
$this::data
[
$offset
] : null;
}