[perl #132154] slurp is mangling newlines, it should not (slurp ‘foo’)

2017-09-23 Thread via RT
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #132154] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=132154 > This was noticed in this PR:

[perl6/specs] aec781: Add notes $?USAGE was renamed to $*USAGE

2017-09-23 Thread GitHub
Branch: refs/heads/master Home: https://github.com/perl6/specs Commit: aec781246cf93a0cdbbd00902fe5471e9694053d https://github.com/perl6/specs/commit/aec781246cf93a0cdbbd00902fe5471e9694053d Author: Zoffix Znet Date: 2017-09-23 (Sat, 23 Sep 2017) Changed

Re: chaining substitutions?

2017-09-23 Thread ToddAndMargo
>> Hi All, >> >> Question. Can I chain these two substitutions together? >> >> $ perl6 -e 'my $x="State : abc "; $x ~~ s/.*?" : "//; $x ~~ s/" >> ".*//; say "<$x>";' >> >> >> >> Many thanks, >> -T On 09/23/2017 07:58 AM, raiph mellor wrote: You want to do two things: 1. match/replace

[perl #132101] [JVM] ‘make’ does not work before ‘make install’

2017-09-23 Thread Christian Bartolomaeus via RT
On Sat, 16 Sep 2017 07:27:48 -0700, alex.jakime...@gmail.com wrote: > From this discussion https://irclog.perlgeek.de/perl6-dev/2017-09- > 16#i_15171820 > > 1) 'make' does not work before 'make install': I believe that happens, > because we use the EvalServer -- and that doesn't look for >

Re: Why can't I "write"?

2017-09-23 Thread Brandon Allbery
On Sat, Sep 23, 2017 at 3:31 PM, Brandon Allbery wrote: > On Sat, Sep 23, 2017 at 2:09 AM, ToddAndMargo > wrote: > >> method write(IO::Handle:D: Blob:D $buf --> True) >> > > The key here is the colon *after* `IO::Handle:D`: that marks the Handle

Re: overwrite?

2017-09-23 Thread Brandon Allbery
On Sat, Sep 23, 2017 at 2:34 AM, ToddAndMargo wrote: > I see ":truncate". This seems liek it will do the trick. > Problem: I would like to read from the file first before > truncating (ro). > > Is there a way to do this, or should I >1) open the handle with :ro >

Re: Why can't I "write"?

2017-09-23 Thread Brandon Allbery
On Sat, Sep 23, 2017 at 2:09 AM, ToddAndMargo wrote: > method write(IO::Handle:D: Blob:D $buf --> True) > The key here is the colon *after* `IO::Handle:D`: that marks the Handle as an invocant, i.e. this is a method to be applied to an object. (The fact that it has

[perl #132104] [JVM] EvalServer seems to leak memory

2017-09-23 Thread Christian Bartolomaeus via RT
On Sat, 16 Sep 2017 07:31:18 -0700, alex.jakime...@gmail.com wrote: > From this discussion https://irclog.perlgeek.de/perl6-dev/2017-09- > 16#i_15171820 > > 4) the EvalServer seems to leak memory. it's no longer possible to run > 'make spectest', even with -Xmx6000m My findings so far: 1) The

[perl #132104] [JVM] EvalServer seems to leak memory

2017-09-23 Thread Christian Bartolomaeus via RT
On Sat, 16 Sep 2017 07:31:18 -0700, alex.jakime...@gmail.com wrote: > From this discussion https://irclog.perlgeek.de/perl6-dev/2017-09- > 16#i_15171820 > > 4) the EvalServer seems to leak memory. it's no longer possible to run > 'make spectest', even with -Xmx6000m My findings so far: 1) The

[perl #131676] doing a role fails to find inherited methods in some cases

2017-09-23 Thread Brian S. Julin via RT
On Mon, 07 Aug 2017 08:25:10 -0700, c...@zoffix.com wrote: > On Thu, 29 Jun 2017 03:46:02 -0700, c...@zoffix.com wrote: > > Mu provides iterator method, but when you mix in a role that wants it > > implemented, it doesn't find it: > > > > m: role Meow { method iterator {…} }; class Bar does Meow

Re: chaining substitutions?

2017-09-23 Thread raiph mellor
You want to do two things: 1. match/replace something 2. match/replace something else To do this in one command you need: * `:g` to tell P6 to keep going after the first match * `||` to tell P6 to match what's on the left first, or if that fails, what's on the right Which yields: my $x="

[perl #131079] [SECURITY] regex injection allows arbitrary execution using dynamic method lookup

2017-09-23 Thread Brian S. Julin via RT
On Thu, 30 Mar 2017 05:41:29 -0700, lloyd.fo...@gmail.com wrote: > my $regex-from-user = '{ shell "/bin/sh" }'; > try say "foo" ~~ /<$regex-from-user>/; # won't work > $regex-from-user = '<::(shell "/bin/sh")>'; > try say "foo" ~~ /<$regex-from-user>/; # you got owned rakudo PR 1168 has been

Re: Why can't I "write"?

2017-09-23 Thread Brent Laabs
OK, a method is something you call on an object, using a the dot operator. A subroutine is an independent object installed into your current lexical scope. If write was a sub, it would work exactly as you described: 48: my $Handle = open( $DateFile, :rw ) 53: write( $Handle,

Re: Why can't I "write"?

2017-09-23 Thread ToddAndMargo
On Sat, Sep 23, 2017 at 8:19 AM, ToddAndMargo > wrote: On 09/22/2017 11:09 PM, ToddAndMargo wrote: Hi All, https://docs.perl6.org/routine/write (IO::Handle)

overwrite?

2017-09-23 Thread ToddAndMargo
Hi All, I want to overwrite a file. Looking at: https://docs.perl6.org/routine/open I see ":truncate". This seems liek it will do the trick. Problem: I would like to read from the file first before truncating (ro). Is there a way to do this, or should I 1) open the handle with :ro 2)

Re: Why can't I "write"?

2017-09-23 Thread Fernando Santagata
Hi, "write" is a method; its signature is method write(IO::Handle:D: Blob:D $buf --> True) so it has to be called as a method, not a sub. Also note the way the first argument is declared, as a IO::Handle:D:, without a comma separating it from the second argument. That's the type of the object

Re: Why can't I "write"?

2017-09-23 Thread ToddAndMargo
On 09/22/2017 11:09 PM, ToddAndMargo wrote: Hi All, https://docs.perl6.org/routine/write (IO::Handle) method write Defined as: method write(IO::Handle:D: Blob:D $buf --> True) Writes $buf to the filehandle. This method can be called even when the handle is

Why can't I "write"?

2017-09-23 Thread ToddAndMargo
Hi All, https://docs.perl6.org/routine/write (IO::Handle) method write Defined as: method write(IO::Handle:D: Blob:D $buf --> True) Writes $buf to the filehandle. This method can be called even when the handle is not in binary mode. This: 48: my $Handle =