MAGE::...:Array(3pm)
π NAME π
Bio::MAGE::Array::Array β bestie, this is a Class for the MAGE-OM API. That's the whole vibe. It's from the User Contributed Perl Documentation manual, section 3pm (iykyk π«Ά).
β¨ SYNOPSIS β¨
Okay so here's how you actually use her. No cap, this is the exact tea:
use Bio::MAGE::Array::Array
# creating an empty instance
my $array = Bio::MAGE::Array::Array->new();
# creating an instance with existing data
my $array = Bio::MAGE::Array::Array->new(
arrayXOrigin=>$arrayxorigin_val,
name=>$name_val,
arrayYOrigin=>$arrayyorigin_val,
identifier=>$identifier_val,
arrayIdentifier=>$arrayidentifier_val,
originRelativeTo=>$originrelativeto_val,
arrayGroup=>$arraygroup_ref,
arrayDesign=>$arraydesign_ref,
information=>$arraymanufacture_ref,
auditTrail=>\@audit_list,
propertySets=>\@namevaluetype_list,
descriptions=>\@description_list,
security=>$security_ref,
arrayManufactureDeviations=>\@arraymanufacturedeviation_list,
);
# 'arrayXOrigin' attribute
my $arrayXOrigin_val = $array->arrayXOrigin(); # getter
$array->arrayXOrigin($value); # setter
# 'name' attribute
my $name_val = $array->name(); # getter
$array->name($value); # setter
# 'arrayYOrigin' attribute
my $arrayYOrigin_val = $array->arrayYOrigin(); # getter
$array->arrayYOrigin($value); # setter
# 'identifier' attribute
my $identifier_val = $array->identifier(); # getter
$array->identifier($value); # setter
# 'arrayIdentifier' attribute
my $arrayIdentifier_val = $array->arrayIdentifier(); # getter
$array->arrayIdentifier($value); # setter
# 'originRelativeTo' attribute
my $originRelativeTo_val = $array->originRelativeTo(); # getter
$array->originRelativeTo($value); # setter
# 'arrayGroup' association
my $arraygroup_ref = $array->arrayGroup(); # getter
$array->arrayGroup($arraygroup_ref); # setter
# 'arrayDesign' association
my $arraydesign_ref = $array->arrayDesign(); # getter
$array->arrayDesign($arraydesign_ref); # setter
# 'information' association
my $arraymanufacture_ref = $array->information(); # getter
$array->information($arraymanufacture_ref); # setter
# 'auditTrail' association
my $audit_array_ref = $array->auditTrail(); # getter
$array->auditTrail(\@audit_list); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $array->propertySets(); # getter
$array->propertySets(\@namevaluetype_list); # setter
# 'descriptions' association
my $description_array_ref = $array->descriptions(); # getter
$array->descriptions(\@description_list); # setter
# 'security' association
my $security_ref = $array->security(); # getter
$array->security($security_ref); # setter
# 'arrayManufactureDeviations' association
my $arraymanufacturedeviation_array_ref = $array->arrayManufactureDeviations(); # getter
$array->arrayManufactureDeviations(\@arraymanufacturedeviation_list); # setter
πΈ DESCRIPTION πΈ
Straight from the MAGE-OM documentation for the "Array" class, and I'm quoting her word for word:
The physical substrate along with its features and their annotation
Periodt. That's the whole concept. The physical thing, plus its features, plus the annotation on top. Gorgeous. π
π¦ INHERITANCE π¦
Bio::MAGE::Array::Array has exactly one superclass, and it's giving very main-character:
Bio::MAGE::Identifiable
π CLASS METHODS π
Okay bestie, here's the glow-up: every single one of these can be called without making an instance first. Just hit her with the class name, like Bio::MAGE::Array::Array->methodname(). Slay.
π new()
π new(%args)
The object constructor "new()" takes these optional named-value style arguments. Every single one, no skipping:
arrayXOriginβ Sets the value of the"arrayXOrigin"attributenameβ Sets the value of the"name"attribute (and heads up, this attribute was inherited from class"Bio::MAGE::Identifiable")arrayYOriginβ Sets the value of the"arrayYOrigin"attributeidentifierβ Sets the value of the"identifier"attribute (inherited from class"Bio::MAGE::Identifiable", just so you know)arrayIdentifierβ Sets the value of the"arrayIdentifier"attributeoriginRelativeToβ Sets the value of the"originRelativeTo"attributearrayGroupβ Sets the value of the"arrayGroup"association. The value must be of type: instance of"Bio::MAGE::Array::ArrayGroup".arrayDesignβ Sets the value of the"arrayDesign"association. The value must be of type: instance of"Bio::MAGE::ArrayDesign::ArrayDesign".auditTrailβ Sets the value of the"auditTrail"association (inherited from class"Bio::MAGE::Describable"). The value must be of type: array of"Bio::MAGE::AuditAndSecurity::Audit".informationβ Sets the value of the"information"association. The value must be of type: instance of"Bio::MAGE::Array::ArrayManufacture".propertySetsβ Sets the value of the"propertySets"association (inherited from class"Bio::MAGE::Extendable"). The value must be of type: array of"Bio::MAGE::NameValueType".descriptionsβ Sets the value of the"descriptions"association (inherited from class"Bio::MAGE::Describable"). The value must be of type: array of"Bio::MAGE::Description::Description".securityβ Sets the value of the"security"association (inherited from class"Bio::MAGE::Describable"). The value must be of type: instance of"Bio::MAGE::AuditAndSecurity::Security".arrayManufactureDeviationsβ Sets the value of the"arrayManufactureDeviations"association. The value must be of type: array of"Bio::MAGE::Array::ArrayManufactureDeviation".
π $obj = class->new(%parameters)
The "new()" method is the class constructor. She's the one who builds the whole thing.
- Parameters: if you hand her a list of name/value parameters, the corresponding slots, attributes, or associations will get their initial values set by the constructor.
- Return value: a reference to an object of the class. π«Ά
- Side effects: it invokes the
"initialize()"method, but only if the class defines one.
π @names = class->get_slot_names()
The "get_slot_names()" method is how you grab the names of all the slots defined in a given class.
NOTE: the list of names does not include attribute or association names. Don't @ me, that's just what it says.
- Return value: a list of the names of all slots defined for this class.
- Side effects: none
π @name_list = get_attribute_names()
Returns the list of attribute data members for this class. That's it, that's the whole method. π
π @name_list = get_association_names()
Returns the list of association data members for this class. Iconic behaviour.
π @class_list = get_superclasses()
Returns the list of superclasses for this class.
π @class_list = get_subclasses()
Returns the list of subclasses for this class.
π $name = class_name()
Returns the full class name for this class. The whole government name.
π $package_name = package_name()
Returns the base package name (i.e. no 'namespace::') of the package that contains this class.
π %assns = associations()
Returns the association meta-information in a hash where the keys are the association names and the values are "Association" objects that provide the meta-information for the association.
π INSTANCE METHODS π
β $obj_copy = $obj->new()
When you invoke her with an existing object reference and not a class name, the "new()" method switches into copy-constructor mode β the new object's initial values get set to be exactly those of the existing object. Clone behaviour, but make it cute. π§
- Parameters: no input parameters are used in the copy constructor, the initial values are taken directly from the object to be copied.
- Return value: a reference to an object of the class.
- Side effects: it invokes the
"initialize()"method if it is defined by the class.
β $obj->set_slots(%parameters)
β $obj->set_slots(\@name_list, \@value_list)
The "set_slots()" method sets a bunch of slots all at once. She has two totally different invocation methods: the first takes a named parameter list, and the second takes two array references. Pick your fighter.
- Return value: none
- Side effects: will call
"croak()"if a slot_name is used that the class does not define. π
β @obj_list = $obj->get_slots(@name_list)
The "get_slots()" method gets the values of a bunch of slots at the same time. Batch mode, bestie.
- Return value: a list of instance objects
- Side effects: none
β $val = $obj->set_slot($name,$val)
The "set_slot()" method sets the slot $name to the value $val.
- Return value: the new value of the slot, i.e.
$val - Side effects: none
β $val = $obj->get_slot($name)
The "get_slot()" method is used to get the values of a number of slots at the same time.
- Return value: a single slot value, or
undefif the slot has not been initialized. - Side effects: none
π ATTRIBUTES π
Attributes are simple data types that belong to a single instance of a class. In the Perl implementation of the MAGE-OM classes, the interface to attributes is implemented using separate setter and getter methods for each attribute. Two methods per attribute, every time. No shortcuts. π
"Bio::MAGE::Array::Array" has the following attribute accessor methods:
πΈ arrayXOrigin
Methods for the "arrayXOrigin" attribute.
From the MAGE-OM documentation:
This can indicate the x position on a slide, chip, etc. of the first Feature and is usually specified relative to the fiducial.
$val = $array->setArrayXOrigin($val)
The restricted setter method for the "arrayXOrigin" attribute.
- Input parameters: the value to which the
"arrayXOrigin"attribute will be set - Return value: the current value of the
"arrayXOrigin"attribute - Side effects: none
- Exceptions: will call
"croak()"if no input parameters are specified, or if too many input parameters are specified
$val = $array->getArrayXOrigin()
The restricted getter method for the "arrayXOrigin" attribute.
- Input parameters: none
- Return value: the current value of the
"arrayXOrigin"attribute - Side effects: none
- Exceptions: will call
"croak()"if any input parameters are specified
πΈ name
Methods for the "name" attribute.
From the MAGE-OM documentation:
The potentially ambiguous common identifier.
$val = $array->setName($val)
The restricted setter method for the "name" attribute.
- Input parameters: the value to which the
nameattribute will be set π - Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified π€ $val = $array->getName()β the restricted getter for thenameattribute, bestie β¨- Input parameters: none
- Return value: the current value of the
nameattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified π ββοΈ
arrayYOrigin πΈ
Methods for the arrayYOrigin attribute, no cap.
From the MAGE-OM documentation:
This can indicate the y position on a slide, chip, etc. of the first Feature and is usually specified relative to the fiducial. π§
$val = $array->setArrayYOrigin($val)β the restricted setter for thearrayYOriginattribute- Input parameters: the value to which the
arrayYOriginattribute will be set - Return value: the current value of the
arrayYOriginattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified π
- Input parameters: the value to which the
$val = $array->getArrayYOrigin()β the restricted getter for thearrayYOriginattribute- Input parameters: none
- Return value: the current value of the
arrayYOriginattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
identifier π
Methods for the identifier attribute.
From the MAGE-OM documentation:
An identifier is an unambiguous string that is unique within the scope (i.e. a document, a set of related documents, or a repository) of its use. π
$val = $array->setIdentifier($val)β the restricted setter for theidentifierattribute- Input parameters: the value to which the
identifierattribute will be set - Return value: the current value of the
identifierattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified π
- Input parameters: the value to which the
$val = $array->getIdentifier()β the restricted getter for theidentifierattribute- Input parameters: none
- Return value: the current value of the
identifierattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
arrayIdentifier π¦
Methods for the arrayIdentifier attribute.
From the MAGE-OM documentation:
An identifying string, e.g. a barcode. π·οΈ
$val = $array->setArrayIdentifier($val)β the restricted setter for thearrayIdentifierattribute- Input parameters: the value to which the
arrayIdentifierattribute will be set - Return value: the current value of the
arrayIdentifierattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified π
- Input parameters: the value to which the
$val = $array->getArrayIdentifier()β the restricted getter for thearrayIdentifierattribute- Input parameters: none
- Return value: the current value of the
arrayIdentifierattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
originRelativeTo π
Methods for the originRelativeTo attribute.
From the MAGE-OM documentation:
What the array origin is relative to, e.g. upper left corner, fiducial, etc. π
$val = $array->setOriginRelativeTo($val)β the restricted setter for theoriginRelativeToattribute- Input parameters: the value to which the
originRelativeToattribute will be set - Return value: the current value of the
originRelativeToattribute - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified π«
- Input parameters: the value to which the
$val = $array->getOriginRelativeTo()β the restricted getter for theoriginRelativeToattribute- Input parameters: none
- Return value: the current value of the
originRelativeToattribute - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
ASSOCIATIONS πβ¨
Okay so associations are references to other classes, like the whole social graph of MAGE-OM. Every association has a cardinality that decides the min and max number of instances of the other class that can be in there. The vibe check:
- There must be exactly one item in the association, i.e. this is a mandatory data field. π
- 0..1 β there may be one item in the association, i.e. this is an optional data field.
- 1..N β there must be one or more items in the association, i.e. this is a mandatory data field, with list cardinality. π₯
- 0..N β there may be one or more items in the association, i.e. this is an optional data field, with list cardinality. β¨
Bio::MAGE::Array::Array has the following association accessor methods, and yes we're going through all of them:
arrayGroup π§¬
Methods for the arrayGroup association.
From the MAGE-OM documentation:
Association between an ArrayGroup and its Arrays, typically the ArrayGroup will represent a slide and the Arrays will be the manufactured so that they may be hybridized separately on that slide. π¬
$val = $array->setArrayGroup($val)β the restricted setter for thearrayGroupassociation- Input parameters: the value to which the
arrayGroupassociation will be set : one of the accepted enumerated values. - Return value: the current value of the
arrayGroupassociation : one of the accepted enumerated values. - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::Array::ArrayGroupπ€
- Input parameters: the value to which the
$val = $array->getArrayGroup()β the restricted getter for thearrayGroupassociation- Input parameters: none
- Return value: the current value of the
arrayGroupassociation : an instance of typeBio::MAGE::Array::ArrayGroup. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
arrayDesign π§ͺ
Methods for the arrayDesign association.
From the MAGE-OM documentation:
The association of a physical array with its array design. π―
$val = $array->setArrayDesign($val)β the restricted setter for thearrayDesignassociation- Input parameters: the value to which the
arrayDesignassociation will be set : one of the accepted enumerated values. - Return value: the current value of the
arrayDesignassociation : one of the accepted enumerated values. - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::ArrayDesign::ArrayDesignπ
- Input parameters: the value to which the
$val = $array->getArrayDesign()β the restricted getter for thearrayDesignassociation- Input parameters: none
- Return value: the current value of the
arrayDesignassociation : an instance of typeBio::MAGE::ArrayDesign::ArrayDesign. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
auditTrail π
Methods for the auditTrail association.
From the MAGE-OM documentation:
A list of Audit instances that track changes to the instance of Describable. π
$array_ref = $array->setAuditTrail($array_ref)β the restricted setter for theauditTrailassociation- Input parameters: the value to which the
auditTrailassociation will be set : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::AuditAndSecurity::Auditinstances π
- Input parameters: the value to which the
$array_ref = $array->getAuditTrail()β the restricted getter for theauditTrailassociation- Input parameters: none
- Return value: the current value of the
auditTrailassociation : a reference to an array of objects of typeBio::MAGE::AuditAndSecurity::Audit - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $array->addAuditTrail(@vals)β because theauditTrailassociation has list cardinality, it may store more than one value. This method adds the current list of objects in theauditTrailassociation. π- Input parameters: the list of values
@valsto add to theauditTrailassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::AuditAndSecurity::Auditπ«
- Input parameters: the list of values
information π
Methods for the information association.
From the MAGE-OM documentation:
Association between the manufactured array and the information on that manufacture. π
$val = $array->setInformation($val)β the restricted setter for theinformationassociation- Input parameters: the value to which the
informationassociation will be set : one of the accepted enumerated values.
- Input parameters: the value to which the
so anyway, back to what setInformation actually hands back to you: π«
- Return value: the current value of the
informationassociation β one of the accepted enumerated values. - Side effects: none. truly none. it's giving chill β¨
- Exceptions: it will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::Array::ArrayManufacture.
$val = $array->getInformation()
The restricted getter for the information association. Look but don't touch, bestie. π
- Input parameters: none
- Return value: the current value of the
informationassociation β an instance of typeBio::MAGE::Array::ArrayManufacture. π - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π propertySets π
Methods for the propertySets association.
From the MAGE-OM documentation:
Allows specification of name/value pairs. Meant to primarily help in-house, pipeline processing of instances by providing a place for values that aren't part of the specification proper.
$array_ref = $array->setPropertySets($array_ref)
The restricted setter for the propertySets association.
- Input parameters: the value to which the
propertySetsassociation will be set β a reference to an array of objects of typeBio::MAGE::NameValueTypeπ«Ά - Return value: the current value of the
propertySetsassociation β a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::NameValueTypeinstances
$array_ref = $array->getPropertySets()
The restricted getter for the propertySets association.
- Input parameters: none
- Return value: the current value of the
propertySetsassociation β a reference to an array of objects of typeBio::MAGE::NameValueType - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $array->addPropertySets(@vals)
Because the propertySets association has list cardinality, it may store more than one value. This method adds the current list of objects in the propertySets association.
- Input parameters: the list of values
@valsto add to thepropertySetsassociation. NOTE: submitting a single value is permitted. (yes, one is enough, we love a flexible queen π ) - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::NameValueType
π¦ descriptions π¦
Methods for the descriptions association.
From the MAGE-OM documentation:
Free hand text descriptions. Makes available the associations of Description to an instance of Describable.
$array_ref = $array->setDescriptions($array_ref)
The restricted setter for the descriptions association.
- Input parameters: the value to which the
descriptionsassociation will be set β a reference to an array of objects of typeBio::MAGE::Description::Description - Return value: the current value of the
descriptionsassociation β a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::Description::Descriptioninstances
$array_ref = $array->getDescriptions()
The restricted getter for the descriptions association.
- Input parameters: none
- Return value: the current value of the
descriptionsassociation β a reference to an array of objects of typeBio::MAGE::Description::Description - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $array->addDescriptions(@vals)
Because the descriptions association has list cardinality, it may store more than one value. This method adds the current list of objects in the descriptions association.
- Input parameters: the list of values
@valsto add to thedescriptionsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Description::Description
π security π
Methods for the security association.
From the MAGE-OM documentation:
Information on the security for the instance of the class.
$val = $array->setSecurity($val)
The restricted setter for the security association.
- Input parameters: the value to which the
securityassociation will be set β one of the accepted enumerated values. - Return value: the current value of the
securityassociation β one of the accepted enumerated values. - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$valis not an instance of classBio::MAGE::AuditAndSecurity::Security
$val = $array->getSecurity()
The restricted getter for the security association.
- Input parameters: none
- Return value: the current value of the
securityassociation β an instance of typeBio::MAGE::AuditAndSecurity::Security. - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
π§ arrayManufactureDeviations π§
Methods for the arrayManufactureDeviations association.
From the MAGE-OM documentation:
Association to classes to describe deviations from the ArrayDesign.
$array_ref = $array->setArrayManufactureDeviations($array_ref)
The restricted setter for the arrayManufactureDeviations association.
- Input parameters: the value to which the
arrayManufactureDeviationsassociation will be set β a reference to an array of objects of typeBio::MAGE::Array::ArrayManufactureDeviation - Return value: the current value of the
arrayManufactureDeviationsassociation β a reference to an array of objects of typeBio::MAGE::Array::ArrayManufactureDeviation - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if too many input parameters are specified, or if$array_refis not a reference to an array classBio::MAGE::Array::ArrayManufactureDeviationinstances
$array_ref = $array->getArrayManufactureDeviations()
The restricted getter for the arrayManufactureDeviations association.
- Input parameters: none
- Return value: the current value of the
arrayManufactureDeviationsassociation β a reference to an array of objects of typeBio::MAGE::Array::ArrayManufactureDeviation - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $array->addArrayManufactureDeviations(@vals)
Because the arrayManufactureDeviations association has list cardinality, it may store more than one value. This method adds the current list of objects in the arrayManufactureDeviations association.
- Input parameters: the list of values
@valsto add to thearrayManufactureDeviationsassociation. NOTE: submitting a single value is permitted. - Return value: the number of items stored in the slot after adding
@vals - Side effects: none
- Exceptions: will call
croak()if no input parameters are specified, or if any of the objects in@valsis not an instance of classBio::MAGE::Array::ArrayManufactureDeviation
and here's initialize, straight from the source, no notes, just vibes π:
sub initialize {
my $self = shift;
return 1;
}
π SLOTS, ATTRIBUTES, AND ASSOCIATIONS π
okay bestie listen up, because in the Perl implementation of MAGE-OM classes there are literally three kinds of class data members and you have to know all of them: "slots", "attributes", and "associations". that's the trio. no cap. π
π SLOTS π
so this API uses the word "slot" to mean a data member of the class that was not present in the UML model β it's used for mainly internal purposes, so pls pls pls only touch it if you genuinely understand the inner workings of the API. π most often slots get used by generic methods, like the ones hanging out in the XML writing and reading classes.
Slots are implemented with unified getter/setter methods:
$var = $obj->slot_name();β gets you the current value of the slot. that's it, that's the vibe. β¨$new_var = $obj->slot_name($new_var);β stores$new_varin the slot, and the return value is also$new_var. so it gives you back exactly what you handed it, iconic behaviour honestly.@names = $obj->get_slot_names()β returns the list of all slots in the class. the whole roster. π
DATA CHECKING: No data type checking is made for these methods. zero. none. it does not check, it does not care, it just vibes. π«Ά
π¦ ATTRIBUTES AND ASSOCIATIONS π¦
the terms "attribute" and "association" are for data members of the class that were specified directly from the UML model. so these ones are the real ones, the main characters. π
In the Perl implementation of MAGE-OM classes, association and attribute accessors are implemented using three separate methods:
get*β Retrieves the current value.- NOTE: for associations, if the association has list cardinality, an array reference is returned. yes, a reference. not the list itself. π«
- DATA CHECKING: Ensure that no argument is provided. like, don't pass it anything. it said what it said. π
set*β Sets the current value, replacing any existing value. old value? gone. replaced. bye. π- NOTE: for associations, if the association has list cardinality, the argument must be an array reference. and because of that, you probably should be using the
add*methods instead. lowkey that's the whole tea. π΅ - DATA CHECKING: for attributes, ensure that a single value is provided as the argument. for associations, if the association has list cardinality, ensure that the argument is a reference to an array of instances of the correct MAGE-OM class β otherwise, ensure that there is a single argument of the correct MAGE-OM class. so yes, the class has to be right. no imposter syndrome classes allowed. π
- NOTE: for associations, if the association has list cardinality, the argument must be an array reference. and because of that, you probably should be using the
add*β NOTE: Only present in associations with list cardinality. it doesn't exist anywhere else bestie, don't go looking. π- Appends a list of objects to any values that may already be stored in the association. it's adding to the pile, not replacing the pile. π§Ί
- DATA CHECKING: Ensure that all arguments are of the correct MAGE-OM class. ALL of them. every single one. π€
πΈ GENERIC METHODS πΈ
the unified base class of all MAGE-OM classes, Bio::MAGE::Base, hands you a set of generic methods that will operate on slots, attributes, and associations. one class to rule them all fr fr:
$val = $obj->get_slot($name)
\@list_ref = $obj->get_slots(@name_list);
$val = $obj->set_slot($name,$val)
$obj->set_slots(%parameters)
$obj->set_slots(\@name_list, \@value_list)
see elsewhere in this page for a detailed description of these methods β the details are over there, go look, i'm not retyping the whole thing. π
π BUGS π
pls send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net). we're not scary, we promise. π«Ά
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org). the legend. the blueprint. the moment. β¨
π SEE ALSO π
π POD ERRORS π
hey! so the above document had some coding errors, and they're explained below. not me exposing the typos but okay, transparency era. π
- Around line 484:
'=item' outside of any '=over'
- Around line 569:
You forgot a '=back' before '=head2'
- Around line 1029:
Expected '=item 2'
- Around line 1034:
Expected '=item 3'
- Around line 1039:
Expected '=item 4'
and that's a wrap on this page bestie π this was perl v5.32.0, dated 2020-11-27, straight from the MAGE::...:Array(3pm) manual page. go forth and slay your objects, mwah π
π¦ where this page comes from
- debian bookworm: libbio-mage-perl 20030502.3-6 Β· MIT
- debian trixie: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu jammy: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu noble: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu resolute: libbio-mage-perl 20030502.3-6 Β· MIT
- ubuntu stonking: libbio-mage-perl 20030502.3-6 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms