Commits

Toby Inkster committed 5c91c90

Make $_ work as documented within a mapm block.

  • Participants
  • Parent commits 12b49b8
  • Tags 0.002

Comments (0)

Files changed (3)

File lib/List/MapMulti.pm

 BEGIN
 {
 	$List::MapMulti::AUTHORITY = 'cpan:TOBYINK';
-	$List::MapMulti::VERSION   = '0.001';
+	$List::MapMulti::VERSION   = '0.002';
 	
 	# use this module if it's installed.
 	# don't panic if it's unavailable.
 		
 		while (my @values = $iter->())
 		{
-			$_ = \@values;
+			#$_ = \@values;
 			push @results, $code->(@values);
 		}
 	}
 BEGIN
 {
 	$List::MapMulti::Iterator::AUTHORITY = 'cpan:TOBYINK';
-	$List::MapMulti::Iterator::VERSION   = '0.001';
+	$List::MapMulti::Iterator::VERSION   = '0.002';
 	
 	autovivification->unimport('warn');
 }

File meta/changes.ttl

 	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/List-MapMulti-0.001.tar.gz> ;
 	rdfs:label      "Initial release" .
 
+dist:project :release dist:v_0-002 .
+dist:v_0-001
+	a               :Version ;
+	dc:issued       "2012-04-16"^^xsd:date ;
+	:revision       "0.002"^^xsd:string ;
+	:file-release   <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/List-MapMulti-0.002.tar.gz> ;
+	dcs:changeset [
+		dcs:versus dist:v_0-001 ;
+		dcs:item   [ rdfs:label "Make $_ work as documented within a mapm block."; a dcs:Bugfix ];
+		].
-use Test::More tests => 1;
+use Test::More tests => 2;
 use List::MapMulti;
 
 my @numbers = (2..10, qw/Jack Queen King Ace/);
 my @suits   = qw/Clubs Diamonds Hearts Spades/;
-
-my @deck1 = mapm { "$_[0] of $_[1]" } \@numbers, \@suits;
+my $type;
+my @deck1 = mapm { $type = ref $_; "$_[0] of $_[1]" } \@numbers, \@suits;
 my @deck2 = do
 {
 	my @r;
 	@r;
 };
 
+isa_ok($type, 'List::MapMulti::Iterator');
 is_deeply(\@deck1, \@deck2);
+