MAGE::...iation(3pm)
π NAME π
Bio::MAGE::Array::ArrayManufactureDeviation β bestie, it's the class for the MAGE-OM API. That's it, that's the whole name. π
(also this page lives in the User Contributed Perl Documentation section, manual page MAGE::...iation(3pm), if you were wondering where you wandered into π¦)
β¨ SYNOPSIS β¨
okay so here's the whole vibe in code, no cap:
use Bio::MAGE::Array::ArrayManufactureDeviation
# creating an empty instance
my $arraymanufacturedeviation = Bio::MAGE::Array::ArrayManufactureDeviation->new();
# creating an instance with existing data
my $arraymanufacturedeviation = Bio::MAGE::Array::ArrayManufactureDeviation->new(
adjustments=>\@zonedefect_list,
propertySets=>\@namevaluetype_list,
featureDefects=>\@featuredefect_list,
);
# 'adjustments' association
my $zonedefect_array_ref = $arraymanufacturedeviation->adjustments(); # getter
$arraymanufacturedeviation->adjustments(\@zonedefect_list); # setter
# 'propertySets' association
my $namevaluetype_array_ref = $arraymanufacturedeviation->propertySets(); # getter
$arraymanufacturedeviation->propertySets(\@namevaluetype_list); # setter
# 'featureDefects' association
my $featuredefect_array_ref = $arraymanufacturedeviation->featureDefects(); # getter
$arraymanufacturedeviation->featureDefects(\@featuredefect_list); # setter
getter, setter, getter, setter β it's giving very much "same energy, different association" and honestly? iconic. π
πΈ DESCRIPTION πΈ
Straight from the MAGE-OM documentation for the ArrayManufactureDeviation class, and I'm quoting here because why would I paraphrase perfection:
Stores information of the potential difference between an array design and arrays that have been manufactured using that design (e.g. a tip failed to print several spots).
so basically: sometimes the design says one thing and the actual printed array says another π. A tip justβ¦ didn't print several spots. That's the deviation. That's the whole point of this class. It keeps the receipts. π§Ύβ¨
π¦ INHERITANCE π¦
Bio::MAGE::Array::ArrayManufactureDeviation has the following superclasses, and there's exactly one, so it's a very chill family tree:
Bio::MAGE::Extendable
π CLASS METHODS π
Every single one of these can be called without ever making an instance first, bestie β you just use the
Bio::MAGE::Array::ArrayManufactureDeviation->methodname()
syntax and you're good. No object required, the class itself will pick up the phone. π«Ά
π new() π
π new(%args) π
The object constructor new() accepts the following optional named-value style arguments, and yes, all of them are optional, live your truth:
adjustmentsβ Sets the value of theadjustmentsassociation.
The value must be of type: array of Bio::MAGE::Array::ZoneDefect.
propertySetsβ Sets the value of thepropertySetsassociation (and heads up, this association was inherited from classBio::MAGE::Extendable, so it's a little hand-me-down π).
The value must be of type: array of Bio::MAGE::NameValueType.
featureDefectsβ Sets the value of thefeatureDefectsassociation.
The value must be of type: array of Bio::MAGE::Array::FeatureDefect.
π $obj = class->new(%parameters) π
new() is the class constructor. The main character of constructors, honestly.
- Parameters: if you give it a list of name/value parameters, the corresponding slots, attributes, or associations will have their initial values set by the constructor. π
- Return value: it returns a reference to an object of the class.
- Side effects: it invokes the
initialize()method if it is defined by the class. Surprise bonus method call, love that for us β¨
π @names = class->get_slot_names() π
get_slot_names() is how you retrieve the name of all slots defined in a given class.
NOTE: the list of names does not include attribute or association names. Just so we're clear, bestie. No sneaky extras. π
- Return value: a list of the names of all slots defined for this class.
- Side effects: none. Zero. Nada. A completely drama-free method, we stan. π
π @name_list = get_attribute_names() π
returns the list of attribute data members for this class. π
π @name_list = get_association_names() π
returns the list of association data members for this class. π
π @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. π·οΈ
π $package_name = package_name() π
Returns the base package name (i.e. no 'namespace::') of the package that contains this class. So like, the short version. The nickname. π₯°
π %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. ποΈβ¨
β¦and bestie, we are SO not done yet, there's more of this page coming π
π INSTANCE METHODS π
okay bestie, these are the ones you call on an actual object, not on the class itself. this is where the β¨magicβ¨ happens.
π¦ $obj_copy = $obj->new()
When you hit up new() on an already-existing object reference β not a class name β it lowkey becomes a copy constructor. the new object's initial values get set to be exactly those of the existing object. it's giving twin energy, but make it a duplicate π―
- Parameters: no input parameters are used in the copy constructor, fr fr β the initial values are taken directly from the object to be copied.
- Return value: it returns 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) and $obj->set_slots(\@name_list, \@value_list)
The set_slots() method is your girl for setting a whole bunch of slots at the same time. she's got two different ways to be invoked, and honestly? iconic of her. the first one takes a named parameter list, the second takes two array references.
- Return value: none. nothing. nada. π«₯
- Side effects: will call
croak()if a slot_name is used that the class does not define. so don't be out here inventing slots, bestie π
π @obj_list = $obj->get_slots(@name_list)
The get_slots() method is used to get the values of a number of slots at the same time. batch retrieval, we love to see it.
- 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. one slot, one value, no drama.
- 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. (yes, that's what the page says, and we are keeping it exactly as written π)
- Return value: a single slot value, or
undefif the slot has not been initialized. so if you getundefback, that's not a bug, that's just an uninitialized slot being its authentic self π - 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. no shared state, no chaos, just one object's very own little data babies.
Bio::MAGE::Array::ArrayManufactureDeviation has the following attribute accessor methods:
(yes bestie, that list is empty up there π β that's literally all the page gives us, so we're not gonna invent attributes that don't exist. we keep it real.)
π ASSOCIATIONS π
Associations are references to other classes. Associations in MAGE-OM have a cardinality that determines the minimum and maximum number of instances of the 'other' class that maybe included in the association. cardinality is basically the vibe check on "how many of these are allowed here":
- 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::ArrayManufactureDeviation has the following association accessor methods:
π¦ adjustments
Methods for the adjustments association.
From the MAGE-OM documentation:
Descriptions of how a Zone has been printed differently than specified in the ArrayDesign.
$array_ref = $arraymanufacturedeviation->setAdjustments($array_ref)
- The restricted setter method for the
adjustmentsassociation. - Input parameters: the value to which the
adjustmentsassociation will be set : a reference to an array of objects of typeBio::MAGE::Array::ZoneDefect - Return value: the current value of the
adjustmentsassociation : a reference to an array of objects of typeBio::MAGE::Array::ZoneDefect - 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::ZoneDefectinstances
$array_ref = $arraymanufacturedeviation->getAdjustments()
- The restricted getter method for the
adjustmentsassociation. - Input parameters: none
- Return value: the current value of the
adjustmentsassociation : a reference to an array of objects of typeBio::MAGE::Array::ZoneDefect - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $arraymanufacturedeviation->addAdjustments(@vals)
- Because the adjustments association has list cardinality, it may store more than one value. This method adds the current list of objects in the adjustments association. so you can absolutely pile them in, bestie π§Ί
- Input parameters: the list of values
@valsto add to the adjustments association. 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::ZoneDefect
πΈ 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 = $arraymanufacturedeviation->setPropertySets($array_ref)
- The restricted setter method for the
propertySetsassociation. - 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 = $arraymanufacturedeviation->getPropertySets()
- The restricted getter method for the
propertySetsassociation. - 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 = $arraymanufacturedeviation->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 the propertySets association. 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::NameValueType
π featureDefects
Methods for the featureDefects association.
From the MAGE-OM documentation:
Description on features who are manufactured in a different location than specified in the ArrayDesign.
$array_ref = $arraymanufacturedeviation->setFeatureDefects($array_ref)
- The restricted setter method for the
featureDefectsassociation. - Input parameters: the value to which the
featureDefectsassociation will be set : a reference to an array of objects of typeBio::MAGE::Array::FeatureDefect - Return value: the current value of the
featureDefectsassociation : a reference to an array of objects of typeBio::MAGE::Array::FeatureDefect - 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::FeatureDefectinstances
$array_ref = $arraymanufacturedeviation->getFeatureDefects()
- The restricted getter method for the
featureDefectsassociation. - Input parameters: none
- Return value: the current value of the
featureDefectsassociation : a reference to an array of objects of typeBio::MAGE::Array::FeatureDefect - Side effects: none
- Exceptions: will call
croak()if any input parameters are specified
$val = $arraymanufacturedeviation->addFeatureDefects(@vals)
- Because the featureDefects association has list cardinality, it may store more than one value. This method adds the current list of objects in the featureDefects association.
- Input parameters: the list of values
@valsto add to the featureDefects association. 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::FeatureDefect
And then, sitting right there at the bottom like a little bonus snack, here's the initialize() subroutine, verbatim because we do not touch the code, ever:
sub initialize {
my $self = shift;
return 1;
}
π SLOTS, ATTRIBUTES, AND ASSOCIATIONS π
okay bestie, so here's the tea β β in the Perl implementation of MAGE-OM classes, there are literally three types of class data members: slots, attributes, and associations. Three. Not two. Not four. Keep up π
β¨ SLOTS β¨
This API uses the term "slot" to mean a data member of the class that was not present in the UML model and exists mainly for internal purposes. so likeβ¦ use these only if you understand the inner workings of the API, no cap π« Most often slots get used by generic methods, like the ones hanging out in the XML writing and reading classes.
Slots are implemented using unified getter/setter methods:
$var = $obj->slot_name();β grabs the current value of the slot π«³β¨$new_var = $obj->slot_name($new_var);β stores$new_varin the slot, and the return value is also$new_var(it's giving mirror, it's giving reflect πͺ)@names = $obj->get_slot_names()β returns the list of all slots in the class π
DATA CHECKING: No data type checking is made for these methods. none. zero. nada. it will simply not check for you π
π¦ ATTRIBUTES AND ASSOCIATIONS π¦
The terms "attribute" and "association" mean data members of the class that were specified directly from the UML model. so like, the official ones β¨
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. π
DATA CHECKING: Ensure that no argument is provided. (yes, hand them nothing, they said what they said π)
set*β sets the current value, replacing any existing value. out with the old, in with the new π
NOTE: For associations, if the association has list cardinality, the argument must be an array reference. Because of this, you probably should be using the add* methods. fr fr, listen to the manpage on this one π
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. (she's picky, and honestly? valid π)
add*β appends a list of objects to any values that may already be stored in the association.
NOTE: Only present in associations with list cardinality. π
DATA CHECKING: Ensure that all arguments are of the correct MAGE-OM class.
πΈ GENERIC METHODS πΈ
The unified base class of all MAGE-OM classes, Bio::MAGE::Base, provides a set of generic methods that will operate on slots, attributes, and associations β a whole little toolkit, it's giving main character energy π₯
$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. (iykyk π)
π BUGS π
Please send bug reports to the project mailing list: (mged-mage 'at' lists 'dot' sf 'dot' net)
like literally just tell them, they want to know π«Ά
π AUTHOR π
Jason E. Stewart (jasons 'at' cpan 'dot' org)
the icon, the legend, the moment π
π SEE ALSO π
π POD ERRORS π
Hey! The above document had some coding errors, which are explained below:
- Around line 323:
'=item' outside of any '=over'
- Around line 408:
You forgot a '=back' before any '=head2'
(okay so the original says: You forgot a '=back' before '=head2' β not me being messy, that's the actual text π)
- Around line 436:
Expected '=item 2'
- Around line 441:
Expected '=item 3'
- Around line 446:
Expected '=item 4'
the docs are a little unhinged, but honestly? relatable πβ¨
okay that's the whole page bestie, we ate and left absolutely no crumbs π this was MAGE::...iation(3pm) β perl v5.32.0, dated 2020-11-27, straight from the User Contributed Perl Documentation archives. mwah π go forth and slay your objects β¨π¦π
π¦ 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