r53731 - in /branches/upstream/libsearch-gin-perl/current: ./ lib/Search/ lib/Search/GIN/Extract/ lib/Search/GIN/Keys/ lib/Search/GIN/Query/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Mar 6 17:52:15 UTC 2010
Author: gregoa
Date: Sat Mar 6 17:52:08 2010
New Revision: 53731
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=53731
Log:
[svn-upgrade] Integrating new upstream version, libsearch-gin-perl (0.04)
Added:
branches/upstream/libsearch-gin-perl/current/Changes
Modified:
branches/upstream/libsearch-gin-perl/current/MANIFEST
branches/upstream/libsearch-gin-perl/current/META.yml
branches/upstream/libsearch-gin-perl/current/SIGNATURE
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Attributes.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Multiplex.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Keys/Join.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Attributes.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Class.pm
branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Manual.pm
Added: branches/upstream/libsearch-gin-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/Changes?rev=53731&op=file
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/Changes (added)
+++ branches/upstream/libsearch-gin-perl/current/Changes Sat Mar 6 17:52:08 2010
@@ -1,0 +1,6 @@
+0.04 04.03.10
+ - Safer attribute extraction
+ - Multiplex extraction now works
+ - Documentation for query modules
+ - Fixed bug in manual query returning empty list
+ - Updated copyright
Modified: branches/upstream/libsearch-gin-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/MANIFEST?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/MANIFEST (original)
+++ branches/upstream/libsearch-gin-perl/current/MANIFEST Sat Mar 6 17:52:08 2010
@@ -1,3 +1,4 @@
+Changes
lib/Search/GIN.pm
lib/Search/GIN/Callbacks.pm
lib/Search/GIN/Core.pm
Modified: branches/upstream/libsearch-gin-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/META.yml?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/META.yml (original)
+++ branches/upstream/libsearch-gin-perl/current/META.yml Sat Mar 6 17:52:08 2010
@@ -1,11 +1,13 @@
--- #YAML:1.0
name: Search-GIN
-version: 0.03
+version: 0.04
abstract: ~
author: []
license: unknown
distribution_type: module
configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
ExtUtils::MakeMaker: 0
requires:
Data::Stream::Bulk: 0.03
@@ -23,7 +25,7 @@
directory:
- t
- inc
-generated_by: ExtUtils::MakeMaker version 6.48
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Modified: branches/upstream/libsearch-gin-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/SIGNATURE?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/SIGNATURE (original)
+++ branches/upstream/libsearch-gin-perl/current/SIGNATURE Sat Mar 6 17:52:08 2010
@@ -1,5 +1,5 @@
This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.55.
+signed via the Module::Signature module, version 0.61.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
@@ -14,11 +14,12 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-SHA1 70b5013187eef20b44d0bde66da9c658c8052883 MANIFEST
+SHA1 3b05c08d53a36c79c5b552007254f473fdabc110 Changes
+SHA1 3295a00e24571d07b934f60c6577dd7a992d1829 MANIFEST
SHA1 190e9058eb9c6446a1a3f3ddf15b082f1ecde152 MANIFEST.SKIP
-SHA1 1cdc41f0faded922b24e0ed878e14868be0837d6 META.yml
+SHA1 29a990f33c2d5fec829ad4d306450573c86f44f7 META.yml
SHA1 5f1e0f865b697a245db203e54249ad6547040946 Makefile.PL
-SHA1 f85b6236109f7620b934fde4c24ead71d19f9afb lib/Search/GIN.pm
+SHA1 bee3ebc4ad4d9fa3d0d3b992d798f652b0a75123 lib/Search/GIN.pm
SHA1 f0716b53b0e5fb920f5110b340f712923375a9ce lib/Search/GIN/Callbacks.pm
SHA1 40890a8eda7a6376352725caef4bf6f639e97d81 lib/Search/GIN/Core.pm
SHA1 e18e51f98c889704f86653a0e329ad739150b55c lib/Search/GIN/DelegateToIndexed.pm
@@ -32,20 +33,20 @@
SHA1 07d56e6ce02b50dd78a9f7f6d9687fc67eb17aac lib/Search/GIN/Driver/Pack/Values.pm
SHA1 ffdbe05b270141e108e06727fcba324246665dc8 lib/Search/GIN/Driver/TXN.pm
SHA1 b016ba392f6d61c02e16da13986c98a468ad4e3a lib/Search/GIN/Extract.pm
-SHA1 2976054fafa66be7471e282bc2f0d7187359c078 lib/Search/GIN/Extract/Attributes.pm
+SHA1 dcc5b8771bf0a387f5f417bc2aa87196e2e0b361 lib/Search/GIN/Extract/Attributes.pm
SHA1 f093a56d9218702b93dd150f8e5797d61f33db9d lib/Search/GIN/Extract/Callback.pm
SHA1 22c9843de03fd1dc3788f541b8f31ab247a0d6c5 lib/Search/GIN/Extract/Class.pm
SHA1 a636661e7f714ffabd02c47fca5b4c060f9c2b43 lib/Search/GIN/Extract/Delegate.pm
-SHA1 ae95358963eacbd23730c81b58e8d0223a215e8f lib/Search/GIN/Extract/Multiplex.pm
+SHA1 bdfaab429f1590abd84f45ef7d89259798b57931 lib/Search/GIN/Extract/Multiplex.pm
SHA1 dc1e65a9c0dcf5c32fd3cea19cb9e56d92581b0f lib/Search/GIN/Indexable.pm
SHA1 36b229bfad94f47cf10f8f105798a3751f1844e8 lib/Search/GIN/Keys.pm
SHA1 69052354b343dbf0dbf9923f6f080d50db84eed2 lib/Search/GIN/Keys/Deep.pm
SHA1 0e204be979a20d4597f8101a50d47fc6a8e0addc lib/Search/GIN/Keys/Expand.pm
-SHA1 a65ce8c4cb1a9145819561a839648bfd867a1379 lib/Search/GIN/Keys/Join.pm
+SHA1 6fa85a6152c315d8c8ab94887cb619a2fb20e7f9 lib/Search/GIN/Keys/Join.pm
SHA1 e05ca9686dd17a1ec2e1be3800e46652670c14f4 lib/Search/GIN/Query.pm
-SHA1 1cdd7097de52111ef2d10c51b2f47010ccb772e6 lib/Search/GIN/Query/Attributes.pm
-SHA1 cc2b2f717e7487ef2ea4d7598bf9e7ef170ec4fa lib/Search/GIN/Query/Class.pm
-SHA1 6d2f5dcc3a21ccb103e4d2efaddb6d0190510c98 lib/Search/GIN/Query/Manual.pm
+SHA1 52ceea3b51ab3a4a6c13767176656ba0fe208430 lib/Search/GIN/Query/Attributes.pm
+SHA1 07255c95f170e68a1d2f19dcbb677b3d16d93781 lib/Search/GIN/Query/Class.pm
+SHA1 8028fe3ab402d002a54fc9a20d4dc79fed84ce08 lib/Search/GIN/Query/Manual.pm
SHA1 5dc0adcdc75947aa74a5dee636aa3f48cdca3e4a lib/Search/GIN/SelfIDs.pm
SHA1 34985efc8abdc6708e03685b0e0d1cd2f44d3e8a t/attrs.t
SHA1 de5d11d75733971d58ef65c1914a28c4447ef718 t/class.t
@@ -53,9 +54,9 @@
SHA1 ea981bb39d6702edd7a0e2500a2f702ffe7b938a t/key_expansion.t
SHA1 80af19b3a05acc4a5f4edc0ccbfc09d16e9e81d2 t/rels.t
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.7 (Darwin)
+Version: GnuPG v1.4.9 (GNU/Linux)
-iD8DBQFJCqNPVCwRwOvSdBgRAtQqAKCBmdNVQrbR+5UYG+ZjwlmiqbjiyQCfXCeb
-KwxNhOj0fYNPfxun/bgxSDQ=
-=VNyI
+iEYEARECAAYFAkuPpCcACgkQepC8e2JS8ecDQgCgibrd6LrJkh6B4JnriC0ErUtz
+7vcAn3hiT5qYevymjitku6hI/h5GY/k+
+=2tRH
-----END PGP SIGNATURE-----
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN.pm Sat Mar 6 17:52:08 2010
@@ -5,7 +5,7 @@
use strict;
use warnings;
-our $VERSION = "0.03";
+our $VERSION = "0.04";
__PACKAGE__
@@ -27,6 +27,11 @@
More documentation will be released shortly.
+=head1 COPYRIGHT
+
+ Copyright (c) 2008 - 2010 Yuval Kogman, Infinity Interactive. All
+ rights reserved This program is free software; you can redistribute
+ it and/or modify it under the same terms as Perl itself.
+
=cut
-
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Attributes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Attributes.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Attributes.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Attributes.pm Sat Mar 6 17:52:08 2010
@@ -21,7 +21,10 @@
my @meta_attrs = $self->get_meta_attrs($obj, @args);
- return $self->process_keys({ map { $_->name => $_->get_value($obj) } @meta_attrs });
+ return $self->process_keys({ map {
+ my $val = $_->get_value($obj);
+ $_->name => (defined($val) ? $val : undef);
+ } @meta_attrs });
}
sub get_meta_attrs {
@@ -33,7 +36,7 @@
if ( $self->has_attributes ) {
return grep { defined } map { $meta->find_attribute_by_name($_) } @{ $self->attributes };
} else {
- return $meta->compute_all_applicable_attributes;
+ return $meta->get_all_attributes;
}
}
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Multiplex.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Multiplex.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Multiplex.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Extract/Multiplex.pm Sat Mar 6 17:52:08 2010
@@ -14,9 +14,9 @@
);
sub extract_values {
- my ( $self, @args ) = @_;
+ my ( $self, $obj, @args ) = @_;
- return map { $_->extract_values } @{ $self->extractors };
+ return map { $_->extract_values($obj, @args) } @{ $self->extractors };
}
__PACKAGE__->meta->make_immutable;
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Keys/Join.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Keys/Join.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Keys/Join.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Keys/Join.pm Sat Mar 6 17:52:08 2010
@@ -10,7 +10,7 @@
sub join_key {
my ( $self, @key ) = @_;
-
+ no warnings 'uninitialized';
join ":", map { ref($_) ? @$_ : $_ } @key;
}
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Attributes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Attributes.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Attributes.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Attributes.pm Sat Mar 6 17:52:08 2010
@@ -82,3 +82,48 @@
__PACKAGE__
__END__
+
+=pod
+
+=head1 NAME
+
+Search::GIN::Query::Attributes - Create attributes-based GIN queries
+
+=head1 SYNOPSIS
+
+ use Search::GIN::Query::Attributes;
+
+ my $query = Search::GIN::Query::Attributes->new(
+ attributes => {
+ name => 'Homer',
+ },
+ );
+
+=head1 DESCRIPTION
+
+Creates an attributes-based GIN query that can be used to search records in a
+storage.
+
+This is a ready-to-use query that uses an object's attributes to search through
+the storage.
+
+=head1 METHODS/SUBROUTINES
+
+=head2 new
+
+Creates a new query.
+
+=head1 ATTRIBUTES
+
+=head2 attributes
+
+Attributes of the object you want to find.
+
+ my $query = Search::GIN::Query::Attributes->new(
+ attributes => {
+ name => 'Homer',
+ city => 'Springfield',
+ },
+ );
+
+=cut
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Class.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Class.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Class.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Class.pm Sat Mar 6 17:52:08 2010
@@ -98,14 +98,53 @@
=head1 NAME
-Search::GIN::Query::Class -
+Search::GIN::Query::Class - Create class-based GIN queries
=head1 SYNOPSIS
- use Search::GIN::Query::Class;
+ use Search::GIN::Query::Class;
+
+ my $query = Search::GIN::Query::Class->new(
+ class => 'Person',
+ );
=head1 DESCRIPTION
+Creates a class-based GIN query that can be used to search records in a storage.
+
+This is a ready-to-use query that uses class definitions (specifically C<class>,
+C<does> and C<blessed>) to search through the storage.
+
+=head1 METHODS/SUBROUTINES
+
+=head2 new
+
+Creates a new query.
+
+=head1 ATTRIBUTES
+
+=head2 class
+
+The class of the object you want to find.
+
+ my $query = Search::GIN::Query::Class->new(
+ class => 'Person',
+ );
+
+=head2 does
+
+A role consumed by the object you want to find.
+
+ my $query = Search::GIN::Query::Class->new(
+ does => 'TheMonkey',
+ );
+
+=head2 blessed
+
+The name of the package that the object is blessed into.
+
+ my $query = Search::GIN::Query::Class->new(
+ blessed => 'Person',
+ );
+
=cut
-
-
Modified: branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Manual.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Manual.pm?rev=53731&op=diff
==============================================================================
--- branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Manual.pm (original)
+++ branches/upstream/libsearch-gin-perl/current/lib/Search/GIN/Query/Manual.pm Sat Mar 6 17:52:08 2010
@@ -38,11 +38,12 @@
}
sub extract_values {
- my $self = shift;
+ my $self = shift;
+ my $EMPTY = q{};
return (
values => $self->_processed,
- $self->has_method ? ( method => $self->method ) : (),
+ method => $self->has_method ? $self->method : $EMPTY,
);
}
@@ -66,13 +67,37 @@
=head1 NAME
-Search::GIN::Query::Manual -
+Search::GIN::Query::Manual - Create manual GIN queries
=head1 SYNOPSIS
- use Search::GIN::Query::Manual;
+ use Search::GIN::Query::Manual;
+
+ my $query = Search::GIN::Query::Manual->new(
+ values => {
+ name => 'Homer',
+ }
+ );
=head1 DESCRIPTION
+
+Creates a manual GIN query that can be used to search records in a storage.
+
+Unlike the stock GIN queries (L<Search::GIN::Query::Class>,
+L<Search::GIN::Query::Attributes>), with this object you define your search
+manually, allowing you to create any search you want.
+
+=head1 METHODS/SUBROUTINES
+
+=head2 new
+
+Creates a new query.
+
+=head1 ATTRIBUTES
+
+=head2 values
+
+The keys and values to build the query for.
=cut
More information about the Pkg-perl-cvs-commits
mailing list