Skip Menu |

This queue is for tickets about the overload-open CPAN distribution.

Report information
The Basics
Id: 131195
Status: open
Priority: 0/
Queue: overload-open

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

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



Is the prehook coderef able to alter @_ so that the real open op can get different arguments? Like: overload::open->prehook_open(sub { if ($_[1] eq 'foo.txt') { $_[1] = 'bar.txt'; } });
On Wed Dec 18 09:52:24 2019, TOBYINK wrote: Show quoted text
> Is the prehook coderef able to alter @_ so that the real open op can > get different arguments? > > Like: > > overload::open->prehook_open(sub { > if ($_[1] eq 'foo.txt') { > $_[1] = 'bar.txt'; > } > });
It is not able to do that yet. But that could be possible to do. Is this something that you'd like to see?