B::Showlex - Online Linux Manual PageSection : 3pm
Updated : 2023-01-19
Source : perl v5.36.0
Note : Perl Programmers Reference Guide

NAMEB::Showlex − Show lexical variables used in functions or files

SYNOPSIS​ perl −MO=Showlex[,−OPTIONS][,SUBROUTINE] foo.pl

DESCRIPTIONWhen a comma-separated list of subroutine names is given as options, Showlex prints the lexical variables used in those subroutines. Otherwise, it prints the file-scope lexicals in the file.

EXAMPLESTraditional form: ​ $ perl −MO=Showlex −e 'my ($i,$j,$k)=(1,"foo")' ​ Pad of lexical names for comppadlist has 4 entries ​ 0: (0x8caea4) undef ​ 1: (0x9db0fb0) $i ​ 2: (0x9db0f38) $j ​ 3: (0x9db0f50) $k ​ Pad of lexical values for comppadlist has 5 entries ​ 0: SPECIAL #1 &PL_sv_undef ​ 1: NULL (0x9da4234) ​ 2: NULL (0x9db0f2c) ​ 3: NULL (0x9db0f44) ​ 4: NULL (0x9da4264) ​ −e syntax OK New-style form: ​ $ perl −MO=Showlex,−newlex −e 'my ($i,$j,$k)=(1,"foo")' ​ main Pad has 4 entries ​ 0: (0x8caea4) undef ​ 1: (0xa0c4fb8) "$i" = NULL (0xa0b8234) ​ 2: (0xa0c4f40) "$j" = NULL (0xa0c4f34) ​ 3: (0xa0c4f58) "$k" = NULL (0xa0c4f4c) ​ −e syntax OK New form, no specials, outside O framework: ​ $ perl −MB::Showlex −e \ ​ 'my ($i,$j,$k)=(1,"foo"); B::Showlex::compile(−newlex,−nosp)>()' ​ main Pad has 4 entries ​ 1: (0x998ffb0) "$i" = IV (0x9983234) 1 ​ 2: (0x998ff68) "$j" = PV (0x998ff5c) "foo" ​ 3: (0x998ff80) "$k" = NULL (0x998ff74) Note that this example shows the values of the lexicals, whereas the other examples did not (as they're compile-time only).

OPTIONSThe −newlex option produces a more readable name => value format, and is shown in the second example above. The −nosp option eliminates reporting of SPECIALs, such as 0: SPECIAL #1 &PL_sv_undef above. Reporting of SPECIALs can sometimes overwhelm your declared lexicals.

SEE ALSOB::Showlex can also be used outside of the O framework, as in the third example. See B::Concise for a fuller explanation of reasons.

TODOSome of the reported info, such as hex addresses, is not particularly valuable. Other information would be more useful for the typical programmer, such as line-numbers, pad-slot reuses, etc.. Given this, ​−newlex is not a particularly good flag-name.

AUTHORMalcolm Beattie, mbeattie@sable.ox.ac.uk
0
Johanes Gumabo
Data Size   :   8,992 byte
man-B::Showlex.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 173,070
Visitor ID   :     :  
Visitor IP   :   3.133.120.64   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|B::Showlex.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|B::Showlex.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|B::Showlex.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|B::Showlex.3pm|43|'br══─}─══ |'br══─}─══ )