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: 15043
Status: resolved
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: thaljef [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 1.103
  • 1.109
Fixed in: (no value)



Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.417 (Entity 5.417)
X-RT-Original-Encoding: iso-8859-1
Content-Length: 327
Download (untitled) / with headers
text/plain 327b
Adam- Would it be possible to add a method to PPI::Document that returns the the path and filename that was passed into the constructor? If the source code was passed as a scalar ref, it could return false (but probably not undef). It would just make a few things in Perl::Critic a little easier and cleaner. Thanks. -Jeff
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
From: adamk [...] cpan.org
X-RT-Original-Encoding: iso-8859-1
Content-Length: 981
Download (untitled) / with headers
text/plain 981b
[guest - Thu Oct 13 11:24:32 2005]: Show quoted text
> Adam- > > Would it be possible to add a method to PPI::Document that returns the > the path and filename that was passed into the constructor? If the > source code was passed as a scalar ref, it could return false (but > probably not undef). It would just make a few things in > Perl::Critic a little easier and cleaner. Thanks. > > -Jeff
I thought about this for a while when I first did ::Document, and I came to the conclusion that it would be a bad thing to include in the main PPI::Document class. A document should be a document regardless of where it's from. It makes hex_id work, equivalence, and a number of other concepts that are more useful than the inconvenience of having to remember the file yourself. However, if you were to write up a PPI::Document::File subclass that did what you want, wrote a test script to go with it and submitted them, I'm sure I could be convinced to add them to the distribution.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-25001-1143845920-664.15043-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 531
Download (untitled) / with headers
text/plain 531b
On Thu Dec 29 12:58:56 2005, ADAMK wrote: Show quoted text
> [guest - Thu Oct 13 11:24:32 2005]: >
> > Adam-
[snip] Show quoted text
> However, if you were to write up a PPI::Document::File subclass that > did what you want, wrote a test script to go with it and submitted > them, I'm sure I could be convinced to add them to the distribution.
I would be up for that, but seeing that there hasn't been any of my former patches from abut 2..3 months ago applied, I am hesitating to actually spent the time. Can you please resurect PPI? :) best wishes, tels
X-Scanned-BY: AMaViS-ng at bestpractical
MIME-Version: 1.0
X-Spam-Status: No, hits=-2.6 required=8.0 tests=BAYES_00
In-Reply-To: <rt-3.5.HEAD-25001-1143845920-664.15043-5-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: local policy)
References: <RT-Ticket-15043 [...] rt.cpan.org> <rt-3.5.HEAD-25001-1143845920-664.15043-5-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from localhost (localhost.localdomain [127.0.0.1]) by diesel.bestpractical.com (Postfix) with ESMTP id 391394D8127 for <cpan-bug+ppi [...] diesel.bestpractical.com>; Fri, 31 Mar 2006 21:00:08 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id C5FD84D8116 for <bug-PPI [...] rt.cpan.org>; Fri, 31 Mar 2006 21:00:07 -0500 (EST)
Received: (qmail 15560 invoked by alias); 1 Apr 2006 02:00:01 -0000
Received: from smtp01.syd.iprimus.net.au (HELO smtp01.syd.iprimus.net.au) (210.50.30.196) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 31 Mar 2006 17:59:58 -0800
Received: from [192.168.1.101] (58.178.0.72) by smtp01.syd.iprimus.net.au (7.2.072.1) id 440C44E500B4926D for bug-PPI [...] rt.cpan.org; Sat, 1 Apr 2006 12:59:50 +1100
Delivered-To: cpan-bug+ppi [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #15043]
User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
Return-Path: <adam [...] phase-n.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+ppi [...] diesel.bestpractical.com
Date: Sat, 01 Apr 2006 11:59:52 +1000
Message-Id: <442DDE98.10404 [...] phase-n.com>
To: bug-PPI [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Adam Kennedy <adam [...] phase-n.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-25001-1143856814-1879.15043-0-0 [...] rt.cpan.org>
Content-Length: 862
Download (untitled) / with headers
text/plain 862b
Resurect? What haven't you applied your OWN patches yet? Why don't you have a commit bit? WTF was I thinking not adding one for you. What's your sourceforge account name? Adam K via RT wrote: Show quoted text
> Queue: PPI > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=15043 > > > On Thu Dec 29 12:58:56 2005, ADAMK wrote: >
>>[guest - Thu Oct 13 11:24:32 2005]: >> >>
>>>Adam-
> > [snip] >
>>However, if you were to write up a PPI::Document::File subclass that >>did what you want, wrote a test script to go with it and submitted >>them, I'm sure I could be convinced to add them to the distribution.
> > > I would be up for that, but seeing that there hasn't been any of my > former patches from abut 2..3 months ago applied, I am hesitating to > actually spent the time. > > Can you please resurect PPI? :) > > best wishes, > > tels > >
MIME-Version: 1.0
Subject: Righto then!
In-Reply-To: <rt-3.5.HEAD-25001-1143845920-664.15043-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
References: <rt-3.5.HEAD-25001-1143845920-664.15043-0-0 [...] rt.cpan.org>
Message-Id: <rt-3.5.HEAD-8902-1147266245-1118.15043-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 570
Download (untitled) / with headers
text/plain 570b
Show quoted text
> I would be up for that, but seeing that there hasn't been any of my > former patches from abut 2..3 months ago applied, I am hesitating to > actually spent the time.
Deal! So I've added you to SVN, and you should now have access to the PPI codebase, with commit rights. http://svn.phase-n.com/cpan/trunk/PPI/ Show quoted text
> Can you please resurect PPI? :)
Nope, bit busy atm, but you can! http://use.perl.org/~Alias/journal/29327 Even if you just wanted to add the tests for the bugs you care about, that would make it a LOT easier for me to do any fixes you can't handle.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.6.HEAD-411-1157045885-1409.15043-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 25
PPI::Document::File added


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.