Main > Programming > Libraries >

B::LexInfo 0.02

B::LexInfo 0.02

Sponsored Links

B::LexInfo 0.02 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.005 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 850
Date added: 2007-06-26
Publisher: Doug MacEachern

B::LexInfo 0.02 description

B::LexInfo is a Perl module that shows information about subroutine lexical variables.

SYNOPSIS

use B::ShowLex ();
my $lexi = B::ShowLex->new;

Perl stores lexical variable names and values inside a padlist within the subroutine. Certain lexicals will maintain certain attributes after the the variable "goes out of scope". For example, when a scalar is assigned a string value, this value remains after the variable has gone out of scope, but is overridden the next time it is assigned to. Lexical Arrays and Hashes will retain their storage space for the maximum number of entries stored at any given point in time.

This module provides methods to record this information, which can be dumped out as-is or to compare two "snapshots". The information learned from these snapshots can be valuable in a number of ways.

METHODSM

new

Create a new B::LexInfo object:

my $lexi = B::LexInfo->new;

cvlexinfo

Create a padlist snapshot from a single subroutine:

my $info = $lexi->cvlexinfo(Foo::bar);

stash_cvlexinfo

Create a list of padlist snapshots for each subroutine in the given package:

my $info = $lexi->stash_cvlexinfo(Foo);

dumper

Return a reference to a stringified padlist snapshot:

print ${ $lexi->dumper($info) }

diff

Compare two padlist snapshots and return the difference:

my $before = $lexi->stash_cvlexinfo(__PACKAGE__);
... let some code run
my $after = $lexi->stash_cvlexinfo(__PACKAGE__);

my $diff = B::LexInfo->diff($before, $after);
print $$diff;

NOTE: This function relies on the diff -u command. You might need to configure $B::LexInfo::TmpDir and/or $B::LexInfo::DiffCmd to values other than the defaults in LexInfo.pm.

cvrundiff

Take a padlist snapshot of a subroutine, run the subroutine with the given arguments, take another snapshot and return a diff of the snapshots.

my $diff = $lexi->cvrundiff(Foo::bar, "arg1", $arg2);
print $$diff;

Complete example:

package Foo;
use B::LexInfo ();

sub bar {
my($string) = @_;
}

my $lexi = B::LexInfo->new;
my $diff = $lexi->cvrundiff(Foo::bar, "a string");
print $$diff;

Produces:

--- /tmp/B_LexInfo_1848.before Mon Jun 28 19:48:41 1999
+++ /tmp/B_LexInfo_1848.after Mon Jun 28 19:48:41 1999
@@ -2,8 +2,10 @@
{
Foo::bar => {
$string => {
- TYPE => NULL,
- NULL => 0x80efd58
+ TYPE => PV,
+ LEN => 9,
+ PV => a string,
+ CUR => 8
},
__SPECIAL__1 => {
TYPE => NULL,

B::LexInfo 0.02 Screenshot

Advertisements

B::LexInfo 0.02 Keywords

Bookmark B::LexInfo 0.02

Hyperlink code:
Link for forum:

B::LexInfo 0.02 Copyright

WareSeeker periodically updates pricing and software information of B::LexInfo 0.02 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of B::LexInfo 0.02 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
PerlIO is a Perl module created to load on demand PerlIO layers and root of PerlIO::* name space. Free Download
movieinfo is a Perl module created to dump information about movie file(s). Free Download
Tie::Form is a Perl module to access a machine readable database file that minics a hardcopy form. Free Download
B::Lint::StrictOO is a Perl module that applys strict to classes and methods. Free Download
Sub::Regex is a Perl module to create synonymous subroutines. Free Download
Tie::FormA is a Perl module that can access a machine readable database file that minics a hardcopy form. Free Download
avidentify is a command line tool that extracts and prints various meta-information about media files. Free Download
GConf-FS script allows you to view a gconf tree as a file system. Free Download