Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Path-Class CPAN distribution.

Maintainer(s)' notes

I prefer that bugs & patches are filed on GitHub rather than on RT: https://github.com/kenahoo/Path-Class/issues. Thanks.

Report information
The Basics
Id: 55269
Status: open
Priority: 0/
Queue: Path-Class

People
Owner: Nobody in particular
Requestors: nickolay8 [...] gmail.com
Cc:
AdminCc:

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



Subject: [Feature request] anti-slurp - write string to file with single method call
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 467
Download (untitled) / with headers
text/plain 467b
Hello, First of all, thanks for this great module! Save me a lot of time and printed lines ) Would like to propose to implement the "anti-slurp" method: I found myself repeating this code in my simple build scripts: my $fh = $blib_dir->file("somefile.txt")->openw; print $fh $embedder->mhtml_as_string; $fh->close; think would be very convenient to just write: my $fh = $blib_dir->file("somefile.txt")->save($embedder->mhtml_as_string) Thanks again, Nickolay
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12689-1267827440-4.55269-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 395
Download (untitled) / with headers
text/plain 395b
Sounds like a good idea. I'm not crazy about "save" as a method name, it implies something that maintains in-memory state then writes that state to disk. If we want the new method to just accept a string, we could call it spew(). If we want it to be able to take input from an array, or a filehandle object, or whatever, and just DTRT, perhaps it should be called write() or something. -Ken
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-12689-1267827440-4.55269-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-12689-1267827440-4.55269-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12681-1267862468-936.55269-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: nickolay8 [...] gmail.com
X-RT-Original-Encoding: utf-8
Content-Length: 567
Download (untitled) / with headers
text/plain 567b
I'm for "spew" (as its very anti-slurp-ishly :), and also for DTRT in provided parameters. Nickolay On Fri Mar 05 17:17:20 2010, KWILLIAMS wrote: Show quoted text
> Sounds like a good idea. I'm not crazy about "save" as a method name, > it implies something that maintains in-memory state then writes that > state to disk. > > If we want the new method to just accept a string, we could call it
spew(). Show quoted text
> > If we want it to be able to take input from an array, or a filehandle > object, or whatever, and just DTRT, perhaps it should be called write() > or something. > > -Ken


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.