NAME
OODoc::Object - base class for all OODoc classes.
INHERITANCE
OODoc::Object is extended by
OODoc
OODoc::Export
OODoc::Format
OODoc::Index
OODoc::Manifest
OODoc::Manual
OODoc::Parser
OODoc::Text
SYNOPSIS
# Never instantiated directly.
DESCRIPTION
Any object used in the OODoc module is derived from this OODoc::Object class. This means that all functionality in this class is provided for all of the other classes.
OVERLOADED
- overload: '!=' (numeric different)
-
Results in
true
when the objects are different - overload: '==' (numeric equivalent)
-
Numeric comparison is used to compare to objects whether they are identical. On many extensions, string comparison is overloaded to compare the names of the objects.
- overload: 'bool'
-
Always returns
true
: "exists".
METHODS
Constructors
- $class->new(%options)
-
Create a new object (instantiation). All objects in OODoc are created the same way: they carry a list of key-value pairs as option. For examples, see the description of this method in the manual page of the specific object.
The validity of the options for
new
is checked, in contrary to the options when used with many other method defined by OODoc.
Attributes
- $obj->publish(\%options)
-
Extract the data of an object for export, and register it in the index. A HASH is returned which should get filled with useful data.
- $obj->unique()
-
Returns a unique id for this text item. This is the easiest way to see whether two references to the same (overloaded) objects point to the same thing. The ids are numeric.
example:
if($obj1->unique == $obj2->unique) {...} if($obj1 == $obj2) {...} # same via overload
DIAGNOSTICS
- Error: unknown object attribute '$name' for $pkg
-
You have used the option with
$name
, which is not defined with the instantiation (thenew
method) of this object. Cast by new() - Error: unknown object attributes for $pkg: '$names'
-
You have used more than one option which is not defined to instantiate the object. Cast by new()
SEE ALSO
This module is part of OODoc version 3.03, built on September 08, 2025. Website: https://perl.overmeer.net/oodoc/
LICENSE
For contributors see file ChangeLog.
This software is copyright (c) 2003-2025 by Mark Overmeer.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.