Changeset 1958

Show
Ignore:
Timestamp:
11/24/07 10:49:05 (7 years ago)
Author:
nyarla
Message:

lang/perl/Class-Hookable: I implemented hookable_stash method.

Location:
lang/perl/Class-Hookable/trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Class-Hookable/trunk/lib/Class/Hookable.pm

    r1878 r1958  
    2121 
    2222    return $self->{'Class::Hookable'}->{'hooks'}; 
     23} 
     24 
     25sub hookable_stash { 
     26    my ( $self ) = @_; 
     27 
     28    if ( ref $self->{'Class::Hookable'} ne 'HASH' ) { 
     29        $self->{'Class::Hookable'} = { 
     30            hooks   => {}, 
     31            methods => {}, 
     32        }; 
     33    } 
     34 
     35    return $self->{'Class::Hookable'}; 
    2336} 
    2437 
     
    221234Nothing but that is being done. 
    222235 
     236=head2 hookable_stash 
     237 
     238  my $data = $hook->hookable_stash; 
     239 
     240This method is stash in Class::Hookable. 
     241All variables Class::Hookable needs are put here. 
     242 
     243This method does not get arguments, 
     244and return hash reference includes all variables. 
     245 
    223246=head1 REGISTER METOHDS 
    224247