{
    "mode": "perldoc",
    "parameter": "B::Op_private",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/B%3A%3AOp_private/json",
    "generated": "2026-06-16T03:51:00Z",
    "synopsis": "use B::Opprivate;\n# flag details for bit 7 of OPAELEM's opprivate:\nmy $name  = $B::Opprivate::bits{aelem}{7}; # OPpLVALINTRO\nmy $value = $B::Opprivate::defines{$name}; # 128\nmy $label = $B::Opprivate::labels{$name};  # LVINTRO\n# the bit field at bits 5..6 of OPAELEM's opprivate:\nmy $bf  = $B::Opprivate::bits{aelem}{6};\nmy $mask = $bf->{bitmask}; # etc",
    "sections": {
        "NAME": {
            "content": "B::Opprivate - OP opprivate flag definitions\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use B::Opprivate;\n\n# flag details for bit 7 of OPAELEM's opprivate:\nmy $name  = $B::Opprivate::bits{aelem}{7}; # OPpLVALINTRO\nmy $value = $B::Opprivate::defines{$name}; # 128\nmy $label = $B::Opprivate::labels{$name};  # LVINTRO\n\n# the bit field at bits 5..6 of OPAELEM's opprivate:\nmy $bf  = $B::Opprivate::bits{aelem}{6};\nmy $mask = $bf->{bitmask}; # etc\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This module provides four global hashes:\n\n%B::Opprivate::bits\n%B::Opprivate::defines\n%B::Opprivate::labels\n%B::Opprivate::opsusing\n\nwhich contain information about the per-op meanings of the bits in the opprivate field.\n\n%bits\nThis is indexed by op name and then bit number (0..7). For single bit flags, it returns the name\nof the define (if any) for that bit:\n\n$B::Opprivate::bits{aelem}{7} eq 'OPpLVALINTRO';\n\nFor bit fields, it returns a hash ref containing details about the field. The same reference\nwill be returned for all bit positions that make up the bit field; so for example these both\nreturn the same hash ref:\n\n$bitfield = $B::Opprivate::bits{aelem}{5};\n$bitfield = $B::Opprivate::bits{aelem}{6};\n\nThe general format of this hash ref is\n\n{\n# The bit range and mask; these are always present.\nbitmin        => 5,\nbitmax        => 6,\nbitmask       => 0x60,\n\n# (The remaining keys are optional)\n\n# The names of any defines that were requested:\nmaskdef      => 'OPpFOOMASK',\nbaseshiftdef => 'OPpFOOSHIFT',\nbitcountdef  => 'OPpFOOBITS',\n\n# If present, Concise etc will display the value with a 'FOO='\n# prefix. If it equals '-', then Concise will treat the bit\n# field as raw bits and not try to interpret it.\nlabel         => 'FOO',\n\n# If present, specifies the names of some defines and the\n# display labels that are used to assign meaning to particu-\n# lar integer values within the bit field; e.g. 3 is dis-\n# played as 'C'.\nenum          => [ qw(\n1   OPpFOOA  A\n2   OPpFOOB  B\n3   OPpFOOC  C\n)],\n\n};\n\n%defines\nThis gives the value of every \"OPp\" define, e.g.\n\n$B::Opprivate::defines{OPpLVALINTRO} == 128;\n\n%labels\nThis gives the short display label for each define, as used by \"B::Concise\" and \"perl -Dx\", e.g.\n\n$B::Opprivate::labels{OPpLVALINTRO} eq 'LVINTRO';\n\nIf the label equals '-', then Concise will treat the bit as a raw bit and not try to display it\nsymbolically.\n\n%opsusing\nFor each define, this gives a reference to an array of op names that use the flag.\n\n@opsusinglvintro = @{ $B::Opprivate::opsusing{OPpLVALINTRO} };\n",
            "subsections": []
        }
    },
    "summary": "B::Opprivate - OP opprivate flag definitions",
    "flags": [],
    "examples": [],
    "see_also": []
}