Name : perl-Text-Wrap-OO
| |
Version : 0.002
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 18:18:26
|
Group : Unspecified
| Source RPM : perl-Text-Wrap-OO-0.002-lp154.1.1.src.rpm
|
Size : 0.07 MB
| |
Packager : https://www_suse_com/
| |
Summary : An object oriented interface to Text::Wrap
|
Description :
Text::Wrap::OO is an object oriented wrapper to the Text::Wrap module.
Text::Wrap is useful for formatting text, and it is customizable, but it has a drawback: The configuration options are set using global package variables. This means that if a module configures Text::Wrap, it can interfere with other modules that use Text::Wrap. Indeed, the Text::Wrap documentation|Text::Wrap itself warns against setting these variables, or if you must, to \'local()\'ize them first. While this works, it can become cumbersome, and it still does not protect your module against other modules messing with Text::Wrap global variables.
That\'s where Text::Wrap::OO comes in. Text::Wrap::OO provides an object oriented interface to Text::Wrap. The Text::Wrap global variables are automatically localized, so you need not worry about that. The defaults are always the same (unless you use the \'inherit\' attribute; see ATTRIBUTES) for each new object, so you don\'t need to worry about other modules messing with the settings either.
A Text::Wrap::OO object has several attributes that can either be passed to the constructor (discussed later), or through accessor methods. The accessors are methods with the same name as the attributes they access, and can either be called with no arguments to get the value of the attribute, or with one argument to set the value of the attribute.
Two other types of attribute-related methods are provided as well. For an attribute _ATTR_, the \'has__ATTR_\' and \'clear__ATTR_\' methods are available. \'has__ATTR_\' will return true if the attribute _ATTR_ is set, and \'clear__ATTR_\' will unset _ATTR_, as though it had never been set. Note that if an attribute is unset, the accessor will return the default value of the attribute, so \'$object->clear__ATTR_\' is _not_ the same thing as \'$object->_ATTR_(undef)\'.
If you have a very old version of Text::Wrap which does not support a certain configuration variable, the corresponding attribute in a Text::Wrap::OO object will warn if you try to set it, and have no effect. You can turn off these warnings by setting the \'warn\' attribute to a false value (see the documentation for the \'warn\' attribute).
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-T/15.4/noarch |