Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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)



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
From: adamk [...] cpan.org
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.
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
Subject: Re: [rt.cpan.org #15043]
Date: Sat, 01 Apr 2006 11:59:52 +1000
To: bug-PPI [...] rt.cpan.org
From: Adam Kennedy <adam [...] phase-n.com>
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 > >
Subject: Righto then!
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.
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.