NAME
DBIx::Class::Sims::Item - An item being created by the Sims
PURPOSE
This object encapsulates an item being managed by the Sims. It can either be a specification you provided or a row that must be created due to constraints in your database schema.
The initial spec is available as "spec". This is mutable, but will not be used to create the object. Instead, a create-hash is generated by iterating over all the columns and relationships of the underlying ResultSource for this item. That create-hash is used to create the object.
You are likely to see an object of this class if you have a before_create hook.
METHODS
spec()
Returns the specification as received by this object. This is mutable.
has_value($colname)
This returns a boolean indicating if either the spec or the create-hash has a value for this column. This value could be undefined. The create-hash is checked first.
value($colname)
This returns the value for the column. It will return the value in the create-hash first.
Note: If you receive undef, it could be either an undefined value or that there is no set value. Check "has_value" to disambiguate.
set_value($colname, $value)
This will set the value of the column in the create-hash. $value
can be undefined.
This is the only way to set a value in the create-hash.
populate_column($column)
This takes a DBIx::Class::Sims::Column object and does all the appropriate work necessary to populate that column in the create-hash.
parent($relname)
This returns the "" in DBIx::Class::Sims::Item object for the relationship.
source()
This returns the "" in DBIx::Class::Sims::Source object for this item.
AUTHOR
Rob Kinyon <rob.kinyon@gmail.com>
LICENSE
Copyright (c) 2013 Rob Kinyon. All Rights Reserved. This is free software, you may use it and distribute it under the same terms as Perl itself.