View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Martin Schwartz > OLE-Storage-0.386 > OLE::Storage::Property



Annotate this POD

View/Report Bugs


OLE::Storage::Property - maintain Properties for OLE::Storage::Var

$Revision: $ $Date: 1998/02/25 21:13:00 $


OLE::Storage and OLE::PropertySet are returning from time to time a kind of variables called Properties ($Prop). Properties could be handled as follows:

 sub work {
    my $Prop = shift;
    if (is_scalar $Prop) {
       do_something_with ($Prop); # $Prop definitively is a scalar.
    } else {
       foreach $P (@{array $Prop}) {
          work ($P);              # $P could be an array itself.

$string = $Prop -> string()

$NewProp = $OldProp -> cast ("string")


OLE::Storage::Property is maintaining the Properties, that are initially instantiated by other packages. It gives storage places to OLE::Storage::Var, manages Property to Property conversions, Property to scalar conversions and type information. Though you will use the member functions of OLE::Storage::Property quite often, you should never create a Property directly with this package. Therefore "use OLE::Storage::Property" even was useless.

Type implementation itself is done at OLE::Storage::Var, that offers some private methods for OLE::Storage::Property. Both, type conversions and type availability are quite far from being complete (as you will notice when looking at For this release I cared only to have the something->string conversions working, and therefore only them are documented above.


\@Properties = $Prop -> array()

Returns a reference to a Property list. You have to use this to find out, which properties are hiding inside an array property.

Conversion: Property to perl scalar

$scalar = $Prop -> method()

Returns a scalar variable, that perl understands. Momentarily method() should be string() only.

Conversion: Property to Property

$NewProp = $OldProp -> cast ("method")

Returns a Property of type method.


1||0 == $Prop -> is_scalar()

Returns 1 if $Prop is a scalar variable, 0 otherwise. A property is scalar, if it is not an array.


1||0 == $Prop -> is_array()

Returns 1 if $Prop is some array variable, 0 otherwise.


1||0 == $Prop -> is_varray()

Returns 1 if $Prop is a variant array variable, 0 otherwise. A variant array is an array, that consists out of elements with different types.


$type = $Prop -> stype()

Returns the scalar type of property $Prop. This is useful if $Prop is an array and you want to know, what kind of variables it consists of.


$type = $Prop -> type()

Returns the type of the Property. It is a number if it is a real property type, and it is a string, if it is an internal property type.


$typestr = $Prop -> typestr()

Returns the name of the property type as string.


Property handling is very slow.


OLE::Storage::Var, demonstration program "ldat"


Martin Schwartz <>.

syntax highlighting: