Lingua::LangId::Object - language guesser: generic objects |
Lingua::LangId::Object - language guesser: generic objects
##======================================================================== ## PRELIMINARIES use Lingua::LangId::Object; ##======================================================================== ## Constructors etc. $obj = $CLASS_OR_OBJ->new(%opts); @noShadowKeys = $obj->noShadowKeys(); $obj2 = $obj->shadow(%opts); $obj2 = $obj->clone(); ##======================================================================== ## Methods: I/O $bool = $obj->saveBinFile($filename_or_fh); $str = $obj->saveBinString(); $bool = $CLASS_OR_OBJECT->loadBinFile($filename_or_fh); $str = $CLASS_OR_OBJECT->loadBinString($str); $bool = $obj->saveTextFile($filename_or_fh); $str = $obj->saveTextString(); $bool = $CLASS_OR_OBJECT->loadTextFile($filename_or_fh); $str = $CLASS_OR_OBJECT->loadTextString($str);
$obj = $CLASS_OR_OBJ->new(%opts);
Returns new object as hash-ref.
@noShadowKeys = $obj->noShadowKeys();
Returns list of keys not to be passed to $CLASS->new()
on shadow()
.
Default just returns empty list
$obj2 = $obj->shadow(%opts);
Returns new object identical to $obj, overriding %opts.
$obj2 = $obj->clone();
Object cloning utility using Storable::dclone.
$bool = $obj->saveBinFile($filename_or_fh);
Save object to a binary file or handle using Storable module.
$str = $obj->saveBinString();
Save object to a binary string.
$bool = $CLASS_OR_OBJECT->loadBinFile($filename_or_fh);
Load object from a binary file or handle.
$str = $CLASS_OR_OBJECT->loadBinString($str);
Load object form a binary string.
$bool = $obj->saveTextFile($filename_or_fh);
Save object to a text file or handle. Not supported by all subclasses.
Dummy method, override to make available for a new subclass.
$str = $obj->saveTextString();
Save object to a text string. Not supported by all subclasses.
$bool = $CLASS_OR_OBJECT->loadTextFile($filename_or_fh);
Load object from a text file or handle. Not supported by all subclasses.
Dummy method, override to make available for a new subclass.
$str = $CLASS_OR_OBJECT->loadTextString($str);
Load object from text string.
Lingua::LangId(3pm)
Bryan Jurish <jurish@uni-potsdam.de>
Copyright (C) 2009 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
Lingua::LangId::Object - language guesser: generic objects |