Andrew Sterling Hanenkamp > Repository-Simple-0.06 > Repository::Simple::Type::Property



Annotate this POD

View/Report Bugs
Module Version: 0.06   Source  


Repository::Simple::Type::Property - Types for repository properties


See "SYNOPSIS" in Repository::Simple::Type::Node.


Property types are used to determine information about what kind of information is acceptable for a property and how it may be updated. This class provides a flexible way of describing the possible values, a method for marshalling and unmarshalling those values to and from a scalar for storage, and other metadata about possible values.


$type = Repository::Simple::Type::Property->new(%args)

Creates a new property type with the given arguments, %args.

The following arguments are used:

engine (required)

This is a reference to the storage engine owning this property type.

name (required)

This is a short identifying name for the type. This should be a fully qualified name, e.g., "ns:name".


This property should be set to true if the creation of a node containing a property of this type triggers the creation of a property of this type.

By default, this value is false.


This property should be set to true if the value stored in the property cannot be changed.

By default, this value is false.


When this property is set to a true value, this property may not be set to undef or deleted.

By default, this value is false.


This property should be set to an instance of Repository::Simple::Type::Value for the type of value that is stored in it.

By default, this is set to an instance of Repository::Simple::Type::Value::Scalar.

$name = $type->name

This method returns the name of the type.

$auto_created = $type->auto_created

Returns a true value if the property is automatically created with the parent.

$updatable = $type->updatable

Returns a true value if the value may be changed.

$removable = $type->removable

Returns a true value if the value may be removed from it's parent node.

$value_type = $type->value_type

Returns the value type of the properties value.


Andrew Sterling Hanenkamp, <>


Copyright 2005 Andrew Sterling Hanenkamp <>. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: