HTML::Widget::Accessor(3pm)

HTML::Widget::Accessor3pm

Accessor class

Usage

    use base 'HTML::Widget::Accessor';

Overview

Accessor Class.

Methods

attributes

attrs

Arguments: %attributes

Arguments: \%attributes

Return Value: $self

Arguments: none

Return Value: \%attributes

Accepts either a list of key/value pairs, or a hash-ref.

    $w->attributes( $key => $value );
    $w->attributes( { $key => $value } );

Returns the object reference, to allow method chaining.

As of v1.10, passing a hash-ref no longer deletes current attributes, instead the attributes are added to the current attributes hash.

This means the attributes hash-ref can no longer be emptied using "$w-"attributes( { } );>. Instead, you may use "%{ $w-"attributes } = ();>.

As a special case, if no arguments are passed, the return value is a hash-ref of attributes instead of the object reference. This provides backwards compatibility to support:

    $w->attributes->{key} = $value;

"attrs" is an alias for "attributes".

mk_attr_accessors

Arguments: @names

Return Value: @names

Releases

10 releases since Debian 4.0 (Etch); the text changed 7 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7
  5. 8–9
  6. 10–11
  7. 12
  8. 13

Author

Sebastian Riedel, "[email protected]"

License

This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

From libhtml-widget-perl 1.11-7 in Debian 13 (Trixie). Parsed by carta from the page's man source.