Treex::Core::WildAttr - role for arbitrary attributes of Treex objects
version 0.08399
$node->wild->{name_of_my_new_attribute} = $value; $value = $node->wild->{name_of_my_new_attribute};
Moose role for Treex objects that can possess any attributes without defining them in the PML schema. Such 'wild' attributes are stored in trees data files as strings serialized by Data::Dumper.
Expected use cases: you need to store some data structures which are not defined by the Treex PML schema because (1) you do not want to change the schema (e.g. the new attributes are still very unstable, or they are likely to serve only for tentative purposes, or you do not feel competent to touch the PML schema), or (2) you cannot change the schema, because you do not have write permissions for the location in which Treex::Core is installed.
Reference to a hash for storing wild attributes. The attributes are to be accessed as follows:
$object->wild->{$wild_attr_name} = $wild_attr_value;
PML-standard attribute which stores stringified content of the attribute wild. wild and wild_dump are synchronized by methods serialize_wild and deserialize_wild; wild_dump should not be accessed otherwise.
wild
wild_dump
serialize_wild
deserialize_wild
Stores the content of the wild hash into the wild_dump string.
Loads the content from the wild_dump string into the wild hash.
Zdeněk Žabokrtský <zabokrtsky@ufal.mff.cuni.cz>
Copyright © 2011 by Institute of Formal and Applied Linguistics, Charles University in Prague
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Treex::Core, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::Core
CPAN shell
perl -MCPAN -e shell install Treex::Core
For more information on module installation, please visit the detailed CPAN module installation guide.