Re: SQL Trace Profiler

  • From: Mladen Gogala <gogala@xxxxxxxxxxxxx>
  • To: MGogala@xxxxxxxxxxxxxxxxxxxx
  • Date: Mon, 26 Sep 2005 23:40:35 +0000

On 09/26/2005 02:34:50 PM, Gogala, Mladen wrote:
> I tried it and I like it. The only thing that I keep nagging about is the
> fact that it is not written in the Only Proper Scripting Language(TM), 
> but is written in Python instead. Fortunately, there is a good thing 
> for converting the infidels on http://perthon.sourceforge.net
> I'll try whether it works on ORaSRP and let you know if it works.
> God is great and Larry Wall is his prophet!
> --
> Mladen Gogala
> Ext. 121


Unfortunately, I am unable to make it work with perl translator:
$ perl  perthon.pl ex/orasrp.py

      ERROR (line 32): Invalid file input: Was expecting end of file but found
                       "import sys,re,getopt,time" instead

First, I needed an additional module, which wasn't much of a problem:

$ perl  perthon.pl ex/orasrp.py
Can't locate Parse/RecDescent.pm in @INC 

CPAN took care of it:
cpan> install  Parse::RecDescent
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
  Database was generated on Sat, 20 Aug 2005 03:07:50 GMT
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://cpan.cs.utah.edu/pub/CPAN/authors/01mailrc.txt.gz
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok
Fetching with LWP:
  ftp://cpan.cs.utah.edu/pub/CPAN/modules/02packages.details.txt.gz
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
  Database was generated on Mon, 26 Sep 2005 10:01:08 GMT
Fetching with LWP:
  ftp://cpan.cs.utah.edu/pub/CPAN/modules/03modlist.data.gz
Going to read /root/.cpan/sources/modules/03modlist.data.gz
Going to write /root/.cpan/Metadata
Running install for module Parse::RecDescent
Running make for D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz
Fetching with LWP:
  
ftp://cpan.cs.utah.edu/pub/CPAN/authors/id/D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz
CPAN: Digest::MD5 loaded ok
Fetching with LWP:
  ftp://cpan.cs.utah.edu/pub/CPAN/authors/id/D/DC/DCONWAY/CHECKSUMS
Checksum for 
/root/.cpan/sources/authors/id/D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Parse-RecDescent-1.94/
Parse-RecDescent-1.94/Changes
Parse-RecDescent-1.94/demo/
Parse-RecDescent-1.94/demo/demo_autoscoresep.pl
Parse-RecDescent-1.94/demo/demo_bad.pl
Parse-RecDescent-1.94/demo/demo_buildcalc.pl
Parse-RecDescent-1.94/demo/demo_calc.pl
Parse-RecDescent-1.94/demo/demo_Cgrammar.pl
Parse-RecDescent-1.94/demo/demo_cpp.pl
Parse-RecDescent-1.94/demo/demo_decomment.pl
Parse-RecDescent-1.94/demo/demo_decomment_nonlocal.pl
Parse-RecDescent-1.94/demo/demo_delete.pl
Parse-RecDescent-1.94/demo/demo_derived.pl
Parse-RecDescent-1.94/demo/demo_errors.pl
Parse-RecDescent-1.94/demo/demo_implicit.pl
Parse-RecDescent-1.94/demo/demo_language.pl
Parse-RecDescent-1.94/demo/demo_leftassoc.pl
Parse-RecDescent-1.94/demo/demo_leftop.pl
Parse-RecDescent-1.94/demo/demo_lexer.pl
Parse-RecDescent-1.94/demo/demo_lisplike.pl
Parse-RecDescent-1.94/demo/demo_logic.pl
Parse-RecDescent-1.94/demo/demo_matchrule.pl
Parse-RecDescent-1.94/demo/demo_mccoy.pl
Parse-RecDescent-1.94/demo/demo_methods.pl
Parse-RecDescent-1.94/demo/demo_NL2SQL
Parse-RecDescent-1.94/demo/demo_OOparsetree.pl
Parse-RecDescent-1.94/demo/demo_operator.pl
Parse-RecDescent-1.94/demo/demo_parsetree.pl
Parse-RecDescent-1.94/demo/demo_piecewise.pl
Parse-RecDescent-1.94/demo/demo_precalc.pl
Parse-RecDescent-1.94/demo/demo_randomsentence.pl
Parse-RecDescent-1.94/demo/demo_recipe.pl
Parse-RecDescent-1.94/demo/demo_restructure_easy.pl
Parse-RecDescent-1.94/demo/demo_restructure_painful.pl
Parse-RecDescent-1.94/demo/demo_scoredsep.pl
Parse-RecDescent-1.94/demo/demo_selfmod.pl
Parse-RecDescent-1.94/demo/demo_separators.pl
Parse-RecDescent-1.94/demo/demo_simple.pl
Parse-RecDescent-1.94/demo/demo_simplequery.pl
Parse-RecDescent-1.94/demo/demo_simpleXML.pl
Parse-RecDescent-1.94/demo/demo_template.pl
Parse-RecDescent-1.94/demo/demo_textgen.pl
Parse-RecDescent-1.94/demo/demo_whoson.pl
Parse-RecDescent-1.94/lib/
Parse-RecDescent-1.94/lib/Parse/
Parse-RecDescent-1.94/lib/Parse/RecDescent.pm
Parse-RecDescent-1.94/lib/Parse/RecDescent.pod
Parse-RecDescent-1.94/Makefile.PL
Parse-RecDescent-1.94/MANIFEST
Parse-RecDescent-1.94/README
Parse-RecDescent-1.94/test.pl
Parse-RecDescent-1.94/tutorial/
Parse-RecDescent-1.94/tutorial/TPJ-PRD-proc.gif
Parse-RecDescent-1.94/tutorial/TPJ-yacc-proc.gif
Parse-RecDescent-1.94/tutorial/TPJ_maze.gif
Parse-RecDescent-1.94/tutorial/TPJ_tree.gif
Parse-RecDescent-1.94/tutorial/tutorial.html

  CPAN.pm: Going to build D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Parse::RecDescent
cp lib/Parse/RecDescent.pod blib/lib/Parse/RecDescent.pod
cp lib/Parse/RecDescent.pm blib/lib/Parse/RecDescent.pm
Manifying blib/man3/Parse::RecDescent.3pm
  /usr/bin/make  -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
1..18
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18
  /usr/bin/make test -- OK
Running make install
Installing /usr/lib/perl5/site_perl/5.8.5/Parse/RecDescent.pod
Installing /usr/lib/perl5/site_perl/5.8.5/Parse/RecDescent.pm
Installing /usr/share/man/man3/Parse::RecDescent.3pm
Writing 
/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/Parse/RecDescent/.packlist
Appending installation info to 
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod
  /usr/bin/make install  -- OK

cpan>


Now "perthon" modules compiled correctly:
$ perl -c lib/Perthon/*
lib/Perthon/Perthon.pm syntax OK

Still, I cannot translate Python to Perl. One of these days I'll have to do a 
manual rewrite. Shame.


-- 
Mladen Gogala
http://www.mgogala.com


--
//www.freelists.org/webpage/oracle-l

Other related posts: