### components bag
sub
new {
my
$class
=
shift
;
$self
= SUPER::Bag->new;
bless
$self
,
$class
;
}
sub
getBagElement1 {
my
$self
=
shift
;
return
$self
->getFirstElement;
}
### adds a bag element with a single follower (next element in the bag),
### uses BagElement1.pm as a parameter (most likely)
### NOTE : the bag element 1 must be filled beforehand, so this is the 1st el
sub
addBagElement1 {
my
(
$self
,
$bagelement1
) =
@_
;
$self
->setFirstElement(
$bagelement1
);
}
1;