Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-18 Thread Patrick R. Michaud
On Mon, Jul 18, 2011 at 11:26:49AM -0400, Andrew Whitworth wrote: > On Mon, Jul 18, 2011 at 10:41 AM, Peter Lobsinger wrote: > > The destructor does exactly that, but is not triggered by global teardown. > > That seems wrong to me, we should be sweeping pools and destroying > PMCs on global teard

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-18 Thread Andrew Whitworth
On Sun, Jul 17, 2011 at 4:21 AM, Moritz Lenz wrote: > Question to the Parrot developers: How could I implement DESTROY methods > in Rakudo? Is there any vtable I can override, or so? Note that such a > method might itself allocate new GCables. While not urgent, it's > important for us in the long

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-18 Thread Peter Lobsinger
On Sun, Jul 17, 2011 at 11:00 AM, Patrick R. Michaud wrote: > On Sun, Jul 17, 2011 at 10:21:19AM +0200, Moritz Lenz wrote: >> >> Question to the Parrot developers: How could I implement DESTROY methods >> in Rakudo? Is there any vtable I can override, or so? Note that such a >> method might itself

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-18 Thread Andrew Whitworth
On Mon, Jul 18, 2011 at 10:41 AM, Peter Lobsinger wrote: > The destructor does exactly that, but is not triggered by global teardown. That seems wrong to me, we should be sweeping pools and destroying PMCs on global teardown. If we aren't doing that, it's a bug. --Andrew Whitworth

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-18 Thread Patrick R. Michaud
On Mon, Jul 18, 2011 at 10:41:30AM -0400, Peter Lobsinger wrote: > On Sun, Jul 17, 2011 at 11:00 AM, Patrick R. Michaud > wrote: > > On Sun, Jul 17, 2011 at 10:21:19AM +0200, Moritz Lenz wrote: > >> > >> Question to the Parrot developers: How could I implement DESTROY methods > >> in Rakudo? Is t

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-17 Thread Patrick R. Michaud
On Sun, Jul 17, 2011 at 10:21:19AM +0200, Moritz Lenz wrote: > > Question to the Parrot developers: How could I implement DESTROY methods > in Rakudo? Is there any vtable I can override, or so? Note that such a > method might itself allocate new GCables. While not urgent, it's > important for us i

Re: Close($file) required in Perl 6, unlike Perl 5

2011-07-17 Thread Moritz Lenz
On 07/13/2011 10:00 PM, Parrot Raiser wrote: > The following program: > > my $skeleton = "bones\n"; > my $new_file = "grave"; > my $handle = open($new_file, :w); > $handle.print($skeleton); > > opens the "grave" file, but leaves it empty. A last line: > > close($handle);# "close()" generat

Close($file) required in Perl 6, unlike Perl 5

2011-07-16 Thread Parrot Raiser
The following program: my $skeleton = "bones\n"; my $new_file = "grave"; my $handle = open($new_file, :w); $handle.print($skeleton); opens the "grave" file, but leaves it empty. A last line: close($handle);# "close()" generates an error message. is required to get any contents in the file