diff --git a/META.json b/META.json index d6d54e15d..f10511f19 100644 --- a/META.json +++ b/META.json @@ -57,7 +57,7 @@ "provides" : { "Sidef" : { "file" : "lib/Sidef.pm", - "version" : "2.11" + "version" : "2.12" }, "Sidef::Convert::Convert" : { "file" : "lib/Sidef/Convert/Convert.pm" @@ -213,6 +213,6 @@ "http://dev.perl.org/licenses/" ] }, - "version" : "2.11", + "version" : "2.12", "x_serialization_backend" : "JSON::PP version 2.27300" } diff --git a/META.yml b/META.yml index 8b9347c3a..1aafd9cd4 100644 --- a/META.yml +++ b/META.yml @@ -17,7 +17,7 @@ name: Sidef provides: Sidef: file: lib/Sidef.pm - version: '2.11' + version: '2.12' Sidef::Convert::Convert: file: lib/Sidef/Convert/Convert.pm Sidef::Deparse::Perl: @@ -143,5 +143,5 @@ requires: utf8: '0' resources: license: http://dev.perl.org/licenses/ -version: '2.11' +version: '2.12' x_serialization_backend: 'CPAN::Meta::YAML version 0.016' diff --git a/TODO b/TODO index f518b7771..afbc4192c 100644 --- a/TODO +++ b/TODO @@ -3,5 +3,12 @@ TODO list for Sidef General: * improve the OO system +Classes: + * implement roles (from Perl 6) and add the `does` trait for classes + (http://doc.perl6.org/language/objects#Roles) + +Blocks: + * find a better way to implement the `next` and `last` statements + Method/functions: - * implement the `is export` trait for methods (maybe) + * implement the `is export` trait for functions and classes (maybe) diff --git a/lib/Sidef.pm b/lib/Sidef.pm index 8c4359e70..ed6ab3753 100644 --- a/lib/Sidef.pm +++ b/lib/Sidef.pm @@ -1,7 +1,7 @@ package Sidef { use 5.014; - our $VERSION = '2.11'; + our $VERSION = '2.12'; our $SPACES = 0; # the current number of spaces our $SPACES_INCR = 4; # the number of spaces incrementor diff --git a/lib/Sidef/Deparse/Perl.pm b/lib/Sidef/Deparse/Perl.pm index 673626cef..fc1d52bda 100644 --- a/lib/Sidef/Deparse/Perl.pm +++ b/lib/Sidef/Deparse/Perl.pm @@ -954,12 +954,15 @@ HEADER my $raddr = refaddr($obj->{gather}); $code = "do { push \@_$raddr," . $self->deparse_args($obj->{expr}) . "; \$_$raddr\[-1] }"; } - elsif ($ref eq 'Sidef::Types::Block::For') { - ## ok - } elsif ($ref eq 'Sidef::Types::Block::Try') { $code = $ref . '->new'; } + elsif ($ref eq 'Sidef::Variable::Ref') { + ## ok + } + elsif ($ref eq 'Sidef::Types::Block::For') { + ## ok + } elsif ($ref eq 'Sidef::Types::Block::Break') { $code = 'last'; }