]> git.vpit.fr Git - perl/modules/Sub-Nary.git/blobdiff - lib/Sub/Nary.pm
add() always return a reference
[perl/modules/Sub-Nary.git] / lib / Sub / Nary.pm
index b87eaefc48736e2256b048e67517b94ce313700b..7fe085855580aa53a478126802822797cf65a063 100644 (file)
@@ -230,7 +230,6 @@ sub enter {
  my $r = add $self->inspect($op->first);
  shift @{$self->{cv}};
 
- $r = { $r => 1 } unless ref $r;
  $self->{cache}->{$tag} = { %$r };
  return undef, $r;
 }
@@ -448,6 +447,15 @@ sub pp_rv2av {
  $self->inspect($op);
 }
 
+sub pp_sassign {
+ my ($self, $op) = @_;
+
+ my $r = ($self->inspect($op->first))[0];
+
+ my $c = 1 - count $r;
+ return $r, $c ? { 1 => $c } : undef
+}
+
 sub pp_aassign {
  my ($self, $op) = @_;
 
@@ -596,7 +604,7 @@ You can contact me by mail or on #perl @ FreeNode (vincent or Prof_Vince).
 
 =head1 BUGS
 
-Please report any bugs or feature requests to C<bug-b-nary at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sub-Nary>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
+Please report any bugs or feature requests to C<bug-sub-nary at rt.cpan.org>, or through the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Sub-Nary>.  I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
 
 =head1 SUPPORT