Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Stealing lexicals - best practice suggestions

by diotalevi (Canon)
on Apr 17, 2003 at 04:45 UTC ( [id://251127]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use YAPE::Regex;
    my $p = YAPE::Regex->new(qr//);
    $p->YAPE::Regex::Extensible::steal_pat;
    ...
        my $self = shift;
        $self->{'pat'} = peek_sub(\&YAPE::Regex::next)->{'%pat'};
    }
    
  2. or download this
    use YAPE::Regex;
    my $p = YAPE::Regex->new(qr//);
    $p->YAPE::Regex::Extensible::steal_pat;
    ...
        $self->{'pat'} = {};
        lexalias(\&YAPE::Regex::next, '%pat', $self->{'pat'});
    }
    
  3. or download this
    use YAPE::Regex;
    my $p = YAPE::Regex->new(qr//);
    $p->YAPE::Regex::Extensible::steal_pat;
    ...
        # Use Devel::Pointer to construct a reference to it.
        $self->{'pat'} = unsmash_hv( $$h );
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://251127]
Approved by grep
Front-paged by grep
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found