Permalink
Browse files

imported from version 0.27, see Changes file.

  • Loading branch information...
barbie committed Apr 5, 2009
1 parent 6841dcd commit ce0a2f31a9cb71464ccab80f3f6e56575947dd0f
View
13 Changes
@@ -1,5 +1,18 @@
# Changes log for Data::Phrasebook
+0.27 22/02/2007
+ - Handwritten META.yml to conform to current specs.
+ - Changed all instances of LICENCE to LICENSE as *apparently*, to all
+ non-British users of this module, this a bug! I beg to differ -
+ http://dictionary.reference.com/search?q=licence
+ - Added an examples directory. Nothing in it yet, except a request
+ for interesting scripts.
+ - Added missing checks for debug calls
+ - Ensure DP::Generic::loader() returns a value.
+ - Ensure DP::Loader classes know their own class.
+ - More tests!
+ - Devel::Cover - 90.4%
+
0.26 28/09/2006
- Patch supplied from Oliver Gorwits to support the ability of passing
an array reference for the list of dictionaries.
View
@@ -112,4 +112,4 @@ cheers,
Barbie.
http://birmingham.pm.org/
-with much appreciate to Iain (aka Spoon).
+with much appreciation to Iain (aka Spoon).
View
12 LICENSE
@@ -0,0 +1,12 @@
+LICENSE FOR Data-Phrasebook
+
+Copyright � 2003 Iain Truskett. All rights reserved.
+Copyright � 2004-2007 Barbie for Miss Barbell Productions. All Rights Reserved.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+The full text of the licences can be found in the Artistic and
+COPYING files included with this module, or in perlartistic and
+perlgpl in Perl 5.8.1 or later.
+
View
@@ -2,6 +2,7 @@ Artistic
ChangeLog
Changes
COPYING
+examples/examples.txt
INSTALL
lib/Data/Phrasebook.pm
lib/Data/Phrasebook/Debug.pm
@@ -12,7 +13,7 @@ lib/Data/Phrasebook/Loader/Text.pm
lib/Data/Phrasebook/Plain.pm
lib/Data/Phrasebook/SQL.pm
lib/Data/Phrasebook/SQL/Query.pm
-LICENCE
+LICENSE
Makefile.PL
MANIFEST
MANIFEST.SKIP
@@ -30,12 +31,15 @@ t/04debug.t
t/05dicts.t
t/06simpledict.t
t/07baddicts.t
+t/08interpolate.t
+t/08phrases.txt
t/90podtest.t
t/91podcover.t
t/92distribution.t
-t/BookDB.pm
-t/MyClass.pm
-t/MyPhrasebook.pm
+t/lib/BookDB.pm
+t/lib/MyClass.pm
+t/lib/MyPhrasebook.pm
+t/lib/Data/Phrasebook/Loader/Fake.pm
t/phrases/english.txt
t/phrases/french.txt
t/phrases/german.txt
View
@@ -6,7 +6,7 @@
^blib/
^Makefile$
^Phrasebook-
-^MANIFEST.bak$
+\.bak$
^pm_to_blib$
^Makefile.[a-z]+$
\.cvsignore$
View
@@ -1,12 +1,55 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
+--- #YAML:1.0
name: Data-Phrasebook
-version: 0.26
-version_from: lib/Data/Phrasebook.pm
+version: 0.27
+abstract: A collection of modules for accessing phrasebooks from various data sources.
+author:
+ - Barbie <barbie@cpan.org>
+license: gpl
+distribution_type: module
installdirs: site
requires:
- Module::Pluggable: 2.7
- Test::More: 0.47
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ Module::Pluggable: 2.7
+ Test::More: 0.47
+recommends:
+ Test::More: 0.47
+ Test::Pod: 1.00
+ Test::Pod::Coverage: 0.08
+ Test::Distribution: 0
+build_requires:
+ Test::More: 0.47
+provides:
+ Data::Phrasebook:
+ file: lib/Data/Phrasebook.pm
+ version: 0.27
+ Data::Phrasebook::Debug:
+ file: lib/Data/Phrasebook/Debug.pm
+ version: 0.27
+ Data::Phrasebook::Generic:
+ file: lib/Data/Phrasebook/Generic.pm
+ version: 0.27
+ Data::Phrasebook::Loader:
+ file: lib/Data/Phrasebook/Loader.pm
+ version: 0.27
+ Data::Phrasebook::Loader::Base:
+ file: lib/Data/Phrasebook/Loader/Base.pm
+ version: 0.27
+ Data::Phrasebook::Loader::Text:
+ file: lib/Data/Phrasebook/Loader/Text.pm
+ version: 0.27
+ Data::Phrasebook::Plain:
+ file: lib/Data/Phrasebook/Plain.pm
+ version: 0.27
+ Data::Phrasebook::SQL:
+ file: lib/Data/Phrasebook/SQL.pm
+ version: 0.27
+ Data::Phrasebook::SQL::Query:
+ file: lib/Data/Phrasebook/SQL/Query.pm
+ version: 0.27
+no_index:
+ directory:
+ - ./t
+ - ./examples
+meta-spec:
+ version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+generated_by: Hand 1.0
View
@@ -6,6 +6,8 @@ WriteMakefile(
'Module::Pluggable' => '2.7',
'Test::More' => '0.47',
},
+ NO_META => 1,
+
($] >= 5.005 ?
(ABSTRACT_FROM => 'lib/Data/Phrasebook.pm',
AUTHOR => 'Barbie <barbie@cpan.org>') : ()),
View
4 README
@@ -72,11 +72,11 @@ AUTHOR
Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003)
Maintainer: Barbie <barbie@cpan.org> for Miss Barbell Productions
- http://www.missbarbell.co.uk.
+http://www.missbarbell.co.uk.
COPYRIGHT AND LICENCE
- Copyright (C) 2004-2005 Barbie for Miss Barbell Productions.
+ Copyright (C) 2004-2006 Barbie for Miss Barbell Productions.
Copyright (C) 2003 Iain Truskett.
All Rights Reserved.
View
@@ -0,0 +1,15 @@
+To see examples for this distribution, it is recommended you read the test
+scripts included under ./t, which cover basic phrasebooks and SQL phrasebooks.
+
+I may add further examples should the need ever arise. If you have any example
+scripts that use the distribution in an unusual way or make good use of all the
+features available, please feel free to submit one. If submitting an example
+script, please sure to include the following in your POD:
+
+* Author
+* License
+* Copyright
+
+
+Thanks,
+Barbie.
View
@@ -4,12 +4,16 @@ use warnings FATAL => 'all';
use base qw( Data::Phrasebook::Debug );
use Carp qw( croak );
-our $VERSION = '0.26';
+our $VERSION = '0.27';
=head1 NAME
Data::Phrasebook - Abstract your queries!
+=head1 ABSTRACT
+
+A collection of modules for accessing phrasebooks from various data sources.
+
=head1 SYNOPSIS
use Data::Phrasebook;
@@ -115,8 +119,10 @@ sub new
my $debug = delete $args{debug} || 0;
$class->debug($debug);
- $class->store(3,"$class->new IN");
- $class->store(4,"$class->new args=[".$class->dumper(\%args)."]");
+ if($debug) {
+ $class->store(3,"$class->new IN");
+ $class->store(4,"$class->new args=[".$class->dumper(\%args).']');
+ }
my $sub = delete $args{class} || 'Plain';
if (eval "require ${class}::$sub") {
@@ -129,8 +135,9 @@ sub new
croak "Could not find appropriate class for '$sub': [$@]";
}
- $class->store(4,"$class->new sub=[$sub]");
- my $self = $sub->new( %args );
+ $class->store(4,"$class->new sub=[$sub]") if($class->debug);
+
+ return $sub->new( %args );
}
1;
@@ -269,14 +276,15 @@ Please see the README file.
=head1 AUTHOR
-Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003)
-
-Maintainer: Barbie <barbie@cpan.org> since January 2004.
+ Original author: Iain Campbell Truskett (16.07.1979 - 29.12.2003)
+ Maintainer: Barbie <barbie@cpan.org> since January 2004.
+ for Miss Barbell Productions <http://www.missbarbell.co.uk>.
-=head1 LICENCE AND COPYRIGHT
+=head1 COPYRIGHT AND LICENSE
- Copyright (C) Iain Truskett, 2003. All rights reserved.
- Copyright (C) Barbie, 2004-2005. All rights reserved.
+ Copyright (C) 2003 Iain Truskett. All rights reserved.
+ Copyright (C) 2004-2007 Barbie for Miss Barbell Productions.
+ All Rights Reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
@@ -3,7 +3,7 @@ use strict;
use warnings FATAL => 'all';
use Carp qw( croak );
-our $VERSION = '0.26';
+our $VERSION = '0.27';
=head1 NAME
@@ -66,7 +66,7 @@ Accessor to debugging flag.
sub debug
{
my $self = shift;
- @_ ? $debug = shift : $debug;
+ return @_ ? $debug = shift : $debug;
}
=head2 clear
@@ -77,7 +77,7 @@ Clear the currently stored debugging information.
sub clear
{
- @debug = ();
+ return @debug = ();
}
=head2 store
@@ -93,7 +93,8 @@ sub store
my ($self, $id, @args) = @_;
return if(!$id || $debug < $id);
- push @debug, [$id, join(" ",@args)];
+ push @debug, [$id, join(' ',@args)];
+ return;
}
=head2 retrieve
@@ -119,9 +120,12 @@ Uses 'on demand' call to Data::Dumper::Dumper().
sub dumper
{
my $self = shift;
- require 'Data/Dumper.pm';
- Data::Dumper->import();
- Dumper(@_);
+ my $dump = 'Data::Dumper';
+ if(eval { require $dump }) {
+ $dump->import;
+ return Dumper(@_);
+ }
+ return '';
}
1;
@@ -143,7 +147,7 @@ Please see the README file.
=head1 COPYRIGHT AND LICENSE
- Copyright (C) 2004-2005 Barbie for Miss Barbell Productions.
+ Copyright (C) 2004-2007 Barbie for Miss Barbell Productions.
All Rights Reserved.
This module is free software; you can redistribute it and/or
Oops, something went wrong.

0 comments on commit ce0a2f3

Please sign in to comment.