Paul Evans
Paul Evans
PS: I haven't checked yet; this issue might affect many other kinds of constant-folding, or it might be specific just to `pack()`.
If it would be considered too surprising for `join` to suddenly be implemented in terms of an overloaded concat operator, what about adding a new `overload` key whereby classes can...
> That feels backwards, or maybe I dont understand the suggestion properly. If I call join with a list of items, and only one of them has this this new...
> That feature would be included in the `:5.42` feature bundle. Did you mean to say it *wouldn't* be included in the `:5.42` bundle, just the default; much like `indirect`...
> * operating on a hash could be optimized to not build the whole list of values, but iterate on the hash directly instead Another thing that could definitely be...
> @leonerd > > > I.e. both of these should be done efficiently without a temporary list: > > ```perl > > foreach my $elem ( @array ) { ......
99% sure this could be implemented as a CPAN module. You could then alias something like ``` alias jperl = perl -MPerlUseJSONAsStdin ``` and use that instead.
> @leonerd Would `PerlUseJSONAsStdin` be [some kind of source filter] I doubt it because source filters are extremely fragile and prone to breakage, and not a robust way to implement...
I don't think we should close it entirely. It's still a useful suggestion of how to add such a feature *if* there was a compelling reason to do so. Perhaps...
> From what I can tell after a quick tour of the attributes implementation the code doesn't support attributes on lexical subs. Indeed not. Attributes on subs - of any...