Help for this page

Select Code to Download


  1. or download this
    package Tie::Constrained::URI;
    use vars qw/@ISA/;
    use Regexp::Common 'URI';
    ...
    
        $href_ctl->{'test'} = sub { $_[0] =~ /^$RE{URI}{HTTP}$/ }
            if $href =~ /^$RE{URI}{HTTP}$/;
    
  2. or download this
    tie my $obj, Tie::Constrained => sub {
        !$_[0] or $_[0]->isa('My::Frobnicator');
    };