New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PerlIO::scalar doesn't know how to truncate #8572
Comments
From blgl@hagernas.comCreated by blgl@hagernas.comTruncating a string isn't an expensive operation, #! /usr/local/bin/perl Perl Info
|
From @rgarciaOn 26/08/06, via RT Bo Lindbergh <perlbug-followup@perl.org> wrote:
A quick look at the implementation suggests that truncate() only works |
The RT System itself - Status changed from 'new' to 'open' |
From nick@ing-simmons.netRafael Garcia-Suarez <rgarciasuarez@gmail.com> writes:
But a PerlIO::Scalar "is" a file handle :-( That said we there isn't a ftruncate() hook in PerlIO virtualization |
From blgl@hagernas.comIn article <20060901184007.24952.7@llama.ing-simmons.net>,
Adding _only_ ftruncate to PerlIO is not the Right Thing to do, /Bo Lindbergh |
From nick@ing-simmons.netBo Lindbergh <blgl@hagernas.com> writes:
And I would agree with that.
If we fake times in our fake stat then fake futimes makes sense. We could accept the calls and set errno to nearest code that made sense, Have we missed any more fd related calls? |
From blgl@hagernas.comIn article <20060902095359.24952.8@llama.ing-simmons.net>,
That's true for scalar i/o, but they would be useful for other kinds
ioctl and fcntl. I don't know about the former, but a virtual /Bo Lindbergh |
From @leonerdI find this bug still present, and affecting a unit test of mine $ perlsh eval: $fh->print( "AAAAAAAAAA" ); eval: $fh->seek(0,0); $fh->truncate(0) eval: $fh->print( "BB" ) eval: $content This is on: $ perl -v This is perl 5, version 18, subversion 1 (v5.18.1) built for While I await a fix - any known workarounds? E.g. a Tie module? -- leonerd@leonerd.org.uk |
Migrated from rt.perl.org#40241 (status was 'open')
Searchable as RT40241$
The text was updated successfully, but these errors were encountered: