Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename from gather to List::Gather

  • Loading branch information...
commit 138450a7aa30da6a68df97046f4a9eaed0aeac85 1 parent 5fb5c3c
Florian Ragwitz authored
5 .gitignore
View
@@ -5,6 +5,7 @@ Makefile*
!Makefile.PL
*blib
*.h
-gather.*
-!gather.xs
+Gather.*
+!Gather.xs
+List-Gather-*
24 gather.xs → Gather.xs
View
@@ -72,8 +72,8 @@ myck_entersub_take (pTHX_ OP *entersubop, GV *namegv, SV *protosv)
PERL_UNUSED_ARG(namegv);
PERL_UNUSED_ARG(protosv);
- gatherer_offset = pad_findmy("@gather::gatherer",
- sizeof("@gather::gatherer") - 1, 0);
+ gatherer_offset = pad_findmy("@List::Gather::gatherer",
+ sizeof("@List::Gather::gatherer") - 1, 0);
if (gatherer_offset == NOT_IN_PAD)
croak("illegal use of take outside of gather");
@@ -160,14 +160,14 @@ mygenop_padav (pTHX_ U32 flags)
(flags & GENOP_GATHER_INTRO) ? (OPpLVAL_INTRO<<8) : 0);
if (flags & GENOP_GATHER_INTRO) {
- pvarop->op_targ = pad_add_my_array_pvn(aTHX_ "@gather::gatherer",
- sizeof("@gather::gatherer") - 1);
+ pvarop->op_targ = pad_add_my_array_pvn(aTHX_ "@List::Gather::gatherer",
+ sizeof("@List::Gather::gatherer") - 1);
pvarop->op_ppaddr = pp_my_padav;
PL_hints |= HINT_BLOCK_SCOPE;
}
else {
- pvarop->op_targ = pad_findmy("@gather::gatherer",
- sizeof("@gather::gatherer") - 1, 0);
+ pvarop->op_targ = pad_findmy("@List::Gather::gatherer",
+ sizeof("@List::Gather::gatherer") - 1, 0);
}
return pvarop;
@@ -180,8 +180,8 @@ myck_entersub_gathered (pTHX_ OP *entersubop, GV *namegv, SV *protosv)
entersubop = ck_entersub_args_proto(entersubop, namegv, protosv);
- gatherer_offset = pad_findmy("@gather::gatherer",
- sizeof("@gather::gatherer") - 1, 0);
+ gatherer_offset = pad_findmy("@List::Gather::gatherer",
+ sizeof("@List::Gather::gatherer") - 1, 0);
if (gatherer_offset == NOT_IN_PAD)
croak("illegal use of gathered outside of gather");
@@ -228,7 +228,7 @@ myparse_args_gather (pTHX_ GV *namegv, SV *psobj, U32 *flagsp)
return op_scope(blkop);
}
-MODULE = gather PACKAGE = gather
+MODULE = List::Gather PACKAGE = List::Gather
void
gather (...)
@@ -253,9 +253,9 @@ BOOT:
{
CV *gather_cv, *take_cv, *gathered_cv;
- gather_cv = get_cv("gather::gather", 0);
- take_cv = get_cv("gather::take", 0);
- gathered_cv = get_cv("gather::gathered", 0);
+ gather_cv = get_cv("List::Gather::gather", 0);
+ take_cv = get_cv("List::Gather::take", 0);
+ gathered_cv = get_cv("List::Gather::gathered", 0);
cv_set_call_parser(gather_cv, myparse_args_gather, &PL_sv_undef);
2  Makefile.PL
View
@@ -8,7 +8,7 @@ use MMHelper;
eval MMHelper::header_generator();
WriteMakefile(
- NAME => 'gather',
+ NAME => 'List::Gather',
CCFLAGS => MMHelper::ccflags_static('dev'),
MMHelper::mm_args(),
);
4 dist.ini
View
@@ -1,4 +1,4 @@
-name = gather
+name = List-Gather
version = 0.01
author = Florian Ragwitz <rafl@debian.org>
license = Perl_5
@@ -7,7 +7,7 @@ copyright_holder = Florian Ragwitz
[@Filter]
-bundle = @FLORA
-remove = MakeMaker
-dist = gather
+dist = List-Gather
repository_at = github
[PruneFiles]
6 lib/gather.pm → lib/List/Gather.pm
View
@@ -1,4 +1,4 @@
-package gather;
+package List::Gather;
# ABSTRACT: Construct lists procedurally without temporary variables
use strict;
@@ -10,7 +10,7 @@ use XSLoader;
XSLoader::load(
__PACKAGE__,
- $gather::{VERSION} ? ${ $gather::{VERSION} } : (),
+ $List::Gather::{VERSION} ? ${ $List::Gather::{VERSION} } : (),
);
my @keywords;
@@ -23,6 +23,8 @@ use Sub::Exporter -setup => {
=head1 SYNOPSIS
+ use List::Gather;
+
my @list = gather {
# Try to extract odd numbers and odd number names...
for (@data) {
2  t/basic.t
View
@@ -3,7 +3,7 @@ use warnings;
use Test::More 0.98;
use Test::Fatal;
-BEGIN { use_ok 'gather' };
+BEGIN { use_ok 'List::Gather' };
is_deeply
[gather { take $_ for 1..10; take 99 }],
2  t/errors.t
View
@@ -3,7 +3,7 @@ use warnings;
use Test::More 0.89;
use Test::Fatal;
-use gather;
+use List::Gather;
my ($taker) = gather {
take sub { take 42 };
2  t/syntax.t
View
@@ -3,7 +3,7 @@ use warnings;
use Test::More 0.89;
use Test::Fatal;
-use gather;
+use List::Gather;
{
no warnings 'void';
Please sign in to comment.
Something went wrong with that request. Please try again.