Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.203.547 Times

B::Deparse 5.8.8

  Date Added: April 16, 2010  |  Visits: 966

B::Deparse

Report Broken Link
Printer Friendly Version


Product Homepage
Download (93 downloads)



B::Deparse is a Perl compiler backend to produce perl code. SYNOPSIS perl -MO=Deparse[,-d][,-fFILE][,-p][,-q][,-l] [,-sLETTERS][,-xLEVEL] prog.pl B::Deparse is a backend module for the Perl compiler that generates perl source code, based on the internal compiled structure that perl itself creates after parsing a program. The output of B::Deparse wont be exactly the same as the original source, since perl doesnt keep track of comments or whitespace, and there isnt a one-to-one correspondence between perls syntactical constructions and their compiled form, but it will often be close. When you use the -p option, the output also includes parentheses even when they are not required by precedence, which can make it easy to see if perl is parsing your expressions the way you intended. While B::Deparse goes to some lengths to try to figure out what your original program was doing, some parts of the language can still trip it up; it still fails even on some parts of Perls own test suite. If you encounter a failure other than the most common ones described in the BUGS section below, you can help contribute to B::Deparses ongoing development by submitting a bug report with a small example. OPTIONS As with all compiler backend options, these must follow directly after the -MO=Deparse, separated by a comma but not any white space. -d Output data values (when they appear as constants) using Data::Dumper. Without this option, B::Deparse will use some simple routines of its own for the same purpose. Currently, Data::Dumper is better for some kinds of data (such as complex structures with sharing and self-reference) while the built-in routines are better for others (such as odd floating-point values). -fFILE Normally, B::Deparse deparses the main code of a program, and all the subs defined in the same file. To include subs defined in other files, pass the -f option with the filename. You can pass the -f option several times, to include more than one secondary file. (Most of the time you dont want to use it at all.) You can also use this option to include subs which are defined in the scope of a #line directive with two parameters. -l Add #line declarations to the output based on the line and file locations of the original code. -p Print extra parentheses. Without this option, B::Deparse includes parentheses in its output only when they are needed, based on the structure of your program. With -p, it uses parentheses (almost) whenever they would be legal. This can be useful if you are used to LISP, or if you want to see how perl parses your input. If you say if ($var & 0x7f == 65) {print "Gimme an A!"} print ($which ? $a : $b), "n"; $name = $ENV{USER} or "Bob"; B::Deparse,-p will print if (($var & 0)) { print(Gimme an A!) }; (print(($which ? $a : $b)), ???); (($name = $ENV{USER}) or ???) which probably isnt what you intended (the ??? is a sign that perl optimized away a constant value). -P Disable prototype checking. With this option, all function calls are deparsed as if no prototype was defined for them. In other words, perl -MO=Deparse,-P -e sub foo (@) { 1 } foo @x will print sub foo (@) { 1; } &foo(@x); making clear how the parameters are actually passed to foo. -q Expand double-quoted strings into the corresponding combinations of concatenation, uc, ucfirst, lc, lcfirst, quotemeta, and join. For instance, print print "Hello, $world, @ladies, u$gentlemenE, uL$me!"; as print Hello, . $world . , . join($", @ladies) . , . ucfirst($gentlemen) . , . ucfirst(lc $me . !); Note that the expanded form represents the way perl handles such constructions internally -- this option actually turns off the reverse translation that B::Deparse usually does. On the other hand, note that $x = "$y" is not the same as $x = $y: the former makes the value of $y into a string before doing the assignment. -sLETTERS Tweak the style of B::Deparses output. The letters should follow directly after the s, with no space or punctuation. The following options are available: C Cuddle elsif, else, and continue blocks. For example, print if (...) { ... } else { ... } instead of if (...) { ... } else { ... } The default is not to cuddle. iNUMBER Indent lines by multiples of NUMBER columns. The default is 4 columns. T Use tabs for each 8 columns of indent. The default is to use only spaces. For instance, if the style options are -si4T, a line thats indented 3 times will be preceded by one tab and four spaces; if the options were -si8T, the same line would be preceded by three tabs. vSTRING. Print STRING for the value of a constant that cant be determined because it was optimized away (mnemonic: this happens when a constant is used in void context). The end of the string is marked by a period. The string should be a valid perl expression, generally a constant. Note that unless its a number, it probably needs to be quoted, and on a command line quotes need to be protected from the shell. Some conventional values include 0, 1, 42, , foo, and Useless use of constant omitted (which may need to be -sv"Useless use of constant omitted." or something similar depending on your shell). The default is ???. If youre using B::Deparse on a module or other file thats required, you shouldnt use a value that evaluates to false, since the customary true constant at the end of a module will be in void context when the file is compiled as a main program. -xLEVEL Expand conventional syntax constructions into equivalent ones that expose their internal operation. LEVEL should be a digit, with higher values meaning more expansion. As with -q, this actually involves turning off special cases in B::Deparses normal operations. If LEVEL is at least 3, for loops will be translated into equivalent while loops with continue blocks; for instance for ($i = 0; $i < 10; ++$i) { print $i; } turns into $i = 0; while ($i < 10) { print $i; } continue { ++$i } Note that in a few cases this translation cant be perfectly carried back into the source code -- if the loops initializer declares a my variable, for instance, it wont have the correct scope outside of the loop. If LEVEL is at least 5, use declarations will be translated into BEGIN blocks containing calls to require and import; for instance, use strict refs; turns into sub BEGIN { require strict; do { strict->import(refs) }; } If LEVEL is at least 7, if statements will be translated into equivalent expressions using &&, ?: and do {}; for instance print hi if $nice; if ($nice) { print hi; } if ($nice) { print hi; } else { print bye; } turns into $nice and print hi; $nice and do { print hi }; $nice ? do { print hi } : do { print bye }; Long sequences of elsifs will turn into nested ternary operators, which B::Deparse doesnt know how to indent nicely..

Requirements: No special requirements
Platforms: Linux
Keyword: Bdeparse Constant For Instance If Level Level Libraries Mo Nice Option Output Perl Print Programming Will Be
Users rating: 0/10

License: Freeware Size: 12.2 MB
USER REVIEWS
More Reviews or Write Review


B::DEPARSE RELATED
Utilities  -  Busy Cupid 1.0
Have you been wandering around in the tedious days, trying hard to amuse yourself with some random playful shots, little Cupid? Finally it's time to do the lonely hearts a favor in Valentine's Day! In the park of romance, the bachelors and...
163.84 KB  
Modules  -  WP Mailman Integration 1.0
If mailman runs on the same host as WordPress, its list will be available to the blog admin for selection.Newly registered users will be subscribed to the selected list(s). InstallationUnpack and upload it to the /wp-content/plugins/...
 
Modules  -  zonesworld 2.0
When using multiple zones, if the shipment exceeds the highest given weight, an error message will be printed instructing the user to split the order. He will not be able to proceed with the current order.
 
Development Tools  -  Grim Linker GUI 1.0
The Grim Linker GUI can be used as a standalone interface for many simple miscellaneous tasks, such as remoting a pc using VNC (VNC will be pushed to the machine and remotely started), rebooting, logging users off, and locking work stations. It...
 
Modules  -  Fun with Microformat Pingbacks 0.1
If such information is found the content of the pingback comment will be replaced with the summary from the hReview. InstallationUnpack and upload it to the /wp-content/plugins/ directory.Activate the plugin through the 'Plugins' menu in...
 
Libraries  -  Object-Oriented JNI for .NET (low-level) 3.00.07
Object-Oriented JNI for .NET (low-level), Library for .NET Framework v.1.1. Supports Standard JNI interface (SUN/IBM/MS JDK1.1.x-1.6.x) for developing and running code in C#, MCpp, VB, J#.The main features available:- JNI code can be written only...
1.36 MB  
Libraries  -  XML::DOM 1.44
XML::DOM is a perl module for building DOM Level 1 compliant document structures. SYNOPSIS use XML::DOM; my $parser = new XML::DOM::Parser; my $doc = $parser->parsefile ("file.xml"); # print all HREF attributes of all CODEBASE elements...
143.36 KB  
Libraries  -  Audio::TagLib::Tag 1.42
Audio::TagLib::Tag is a simple, generic interface to common audio meta data fields. This is an attempt to abstract away the difference in the meta data formats of various audio codecs and tagging schemes. As such it is generally a subset of what...
1.4 MB  
Libraries  -  Aw::Admin 0.16.7
Aw::Admin is a Perl extension for the ActiveWorks C Administration Libraries. SYNOPSIS use Aw MyFavoriteBroker@my.host.net:6449; require Aw::Admin::ServerClient; my $desc = new Aw::ConnectionDescriptor; my $server = new...
122.88 KB  
Web Authoring  -  phpServerAdmin for Linux 2.0.10
"phpServerAdmin" will be a web based control panel for administrators to administer services like PPTPD, BIND DNS and other services which will be added as more help is available to me. At the moment, atm only PPTPD is available.
563.2 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB