dagolden / Path-Tiny

File path utility
41 stars 59 forks source link

Wishlist: say method #225

Closed andrewsolomon closed 5 years ago

andrewsolomon commented 5 years ago

Before I put together a pull request, how would people feel if we added a "say" method (i.e append with a newline)?

shlomif commented 5 years ago

On Thu, 14 Mar 2019 07:59:27 -0700 Andrew Solomon notifications@github.com wrote:

Before I put together a pull request, how would people feel if we added a "say" method (i.e append with a newline)?

+1 from me, but i'm not an authority on P::T.

--

Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/open-source/projects/fortune-mod/

Happy Birthday! You'll be older than I in no time at this rate! — ED Curtis Curtis on Facebook

Please reply to list if it's a mailing list post - http://shlom.in/reply .

xdg commented 5 years ago

I understand the desire, but that feels like sugar that really isn't "tiny".

ap commented 5 years ago

Did you mean: Devel::Dwarn

andrewsolomon commented 5 years ago

No - Devel::Dwarn is sending the output to STDERR. All I proposed was

path('somefile.dat')->say("foo");

is equivalent to:

path('somefile')->append("foo\n");

ap commented 5 years ago

D’oh, you said that already. I just didn’t hear it over the sound of my very strong expectation for what $path->say would mean.