Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 27631
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: siddharth_chhabra [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



MIME-Version: 1.0
X-Ymail-Osg: j74SPMoVM1nCWAcTcCIQLSW5LGWYyY6q29yRdp_NmGStOXdGdu4LfxqQWOYLGdCws92MQM7HNNEntIZGsVGZ8pURxWpi5KxjHWNs.7TmrGzhIkCygJCAVuK6OjotYA--
X-Spam-Status: No, hits=-1.1 required=8.0 tests=BAYES_05,DKIM_SIGNED,DKIM_VERIFIED,DK_POLICY_TESTING,DK_SIGNED,DK_VERIFIED,HTML_MESSAGE,SPF_PASS
X-Mailer: YahooMailRC/651.29 YahooMailWebService/0.7.41.16
Received-SPF: pass (x1.develooper.com: local policy)
X-Virus-Checked: Checked
Content-Type: multipart/alternative; boundary="0-249318653-1182212059=:54642"
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 8BB2B4D807D for <bug-PPI [...] rt.cpan.org>; Mon, 18 Jun 2007 20:21:10 -0400 (EDT)
Received: (qmail 32495 invoked by alias); 19 Jun 2007 00:21:09 -0000
Received: from web30602.mail.mud.yahoo.com (HELO web30602.mail.mud.yahoo.com) (68.142.200.125) by la.mx.develooper.com (qpsmtpd/0.28) with SMTP; Mon, 18 Jun 2007 17:20:59 -0700
Received: (qmail 54985 invoked by uid 60001); 19 Jun 2007 00:14:20 -0000
Received: from [68.142.201.144] by web30602.mail.mud.yahoo.com via HTTP; Mon, 18 Jun 2007 17:14:20 PDT
Delivered-To: cpan-bug+ppi [...] diesel.bestpractical.com
Subject: perl parsing heredoc ?
Return-Path: <siddharth_chhabra [...] yahoo.com>
Domainkey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=YeeEzCAI0FQFy7swlGodkQ/KIjBEuhjzZR2UtMXg5LaPi+CFvjLf3SMeiNu0eXfiN5YM9l+Zo0Oa9ROLJL28FCDlPCc8GF/nJB/MycbEg+uR83j3+CB5Wd10j2Sy73M5jLg2r8r/z6oc0njjYdZJNwOUbJWRvWlOKR6yYybkVMY=;
X-Original-To: bug-PPI [...] rt.cpan.org
X-Spam-Check-BY: la.mx.develooper.com
Date: Mon, 18 Jun 2007 17:14:19 -0700 (PDT)
Message-Id: <7731.54642.qm [...] web30602.mail.mud.yahoo.com>
To: bug-PPI [...] rt.cpan.org
From: Siddharth Chhabra <siddharth_chhabra [...] yahoo.com>
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: ascii
Content-Length: 3785
Download (untitled) / with headers
text/plain 3.6k
hi I am submitting 2 files for a unit test tmp.pl and parsePerl the variable $sql1 does not show me the value. also the pdom look peculiar...everything is treated as whitespace (i think) i am a perl newbie. any help would be appreciated. is this a known/unknown bug? if not what am i doing wrong ? thanks a lot for your time. tmp.pl starts here ----------------------------------- #!/usr/local/bin/perl # ################################################################### use DBI; use Sys::Hostname; use Getopt::Long; use strict; use warnings; no warnings qw(uninitialized); $|++; my $sql1 = << "EOSQL"; commit; select mid, avgease = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_ease))/convert(numeric(28,0),count(avg_ease)))), avgselect = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_select))/convert(numeric(28,0),count(avg_select)))), avginfo = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_info))/convert(numeric(28,0),count(avg_info)))), avgprice = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_price))/convert(numeric(28,0),count(avg_price)))), avgsite = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_site))/convert(numeric(28,0),count(avg_site)))), avgavail = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_avail))/convert(numeric(28,0),count(avg_avail)))), avgprrep = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_prrep))/convert(numeric(28,0),count(avg_prrep)))), avgcusts = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_custs))/convert(numeric(28,0),count(avg_custs)))), avgprvcy = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_prvcy))/convert(numeric(28,0),count(avg_prvcy)))), avgship = convert(numeric(3,1),(convert(numeric(28,0),sum(avg_ship))/convert(numeric(28,0),count(avg_ship)))), avglikely = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_likely))/convert(numeric(28,0),count(avg_likely)))), avgoverall = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_overall))/convert(numeric(28,0),count(avg_OverAll)))), avgatt1 = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_att1))/convert(numeric(28,0),count(avg_att1)))), avgatt2 = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_att2))/convert(numeric(28,0),count(avg_att2)))), avgatt3 = convert(numeric(3,1), (convert(numeric(28,0),sum(avg_att3))/convert(numeric(28,0),count(avg_att3)))), avgatt4 = null, avgatt5 = null, avgatt6 = null from site_scores_retail where mid not in (27352,29849) group by mid; commit; rollback; EOSQL my $sql2 = ""; tmp.pl ends here ----------------------------------- parsePerl starts here ------------------------------- #!/usr/bin/perl use PPI; use PPI::Dumper; my $perlfile=$ARGV[0]; # Create a new empty document my $Document = PPI::Document->new; # Create a document from source #$Document = PPI::Document->new(\'print "Hello World!\n"'); # Load a Document from a file $Document = PPI::Document->new($perlfile); # Does it contain any POD? if ( $Document->find_any('PPI::Token::Pod') ) { print "Module contains POD\n"; } # Get the name of the main package #$pkg = $Document->find_first('PPI::Statement::Package')->namespace; # Remove all that nasty documentation $Document->prune('PPI::Token::Pod'); $Document->prune('PPI::Token::Comment'); # Create the dumper my $Dumper = PPI::Dumper->new( $Document ); # Dump the document $Dumper->print; # Save the file #$Document->save($perlfile.".stripped"); my $ST = $Document->find('Statement::Variable'); foreach my $Var ( @$ST ) { print $Var."\n"; } parsePerl ends here ------------------------------- Send instant messages to your online friends http://uk.messenger.yahoo.com
Content-Type: text/html; charset=ascii
X-RT-Original-Encoding: ascii
Content-Length: 4980
MIME-Version: 1.0
In-Reply-To: <7731.54642.qm [...] web30602.mail.mud.yahoo.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <7731.54642.qm [...] web30602.mail.mud.yahoo.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-29948-1415797687-1269.27631-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 184
Download (untitled) / with headers
text/plain 184b
Since this is a very old newbie question i am closing it for now. If any help can still be rendered, please ask in the github issues. I promise we'll answer faster this time around. :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.