BerkeleyDB

 view release on metacpan or  search on metacpan

BerkeleyDB.pm  view on Meta::CPAN

737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
# Preloaded methods go here.
 
 
sub ParseParameters($@)
{
    my ($default, @rest) = @_ ;
    my (%got) = %$default ;
    my (@Bad) ;
    my ($key, $value) ;
    my $sub = (caller(1))[3] ;
    my %options = () ;
    local ($Carp::CarpLevel) = 1 ;
 
    # allow the options to be passed as a hash reference or
    # as the complete hash.
    if (@rest == 1) {
 
        croak "$sub: parameter is not a reference to a hash"
            if ref $rest[0] ne "HASH" ;

ppport.h  view on Meta::CPAN

16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
    for (;;) {
        /* we may be in a higher stacklevel, so dig down deeper */
        while (cxix < 0 && top_si->si_type != PERLSI_MAIN) {
            top_si = top_si->si_prev;
            ccstack = top_si->si_cxstack;
            cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
        }
        if (cxix < 0)
            return NULL;
        /* caller() should not report the automatic calls to &DB::sub */
        if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
                ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
            level++;
        if (!level--)
            break;
        cxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
    }
 
    cx = &ccstack[cxix];
    if (dbcxp) *dbcxp = cx;
 
    if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
        const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
        /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
           field below is defined for any cx. */
        /* caller() should not report the automatic calls to &DB::sub */
        if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
            cx = &ccstack[dbcxix];
    }
 
    return cx;
}
 
# endif
#endif /* caller_cx */
#endif /* 5.6.0 */



( run in 0.450 second using v1.01-cache-2.11-cpan-5f2e87ce722 )