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 pmich...@pobox.com 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

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 plobs...@gmail.com 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

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 pmich...@pobox.com 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

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 mor...@faui2k3.org 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

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 plobs...@gmail.com 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

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() generates an error

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 in

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,