The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Build.PL 210
Changes 09
META.json 514
META.yml 37
README 21
btparse/pccts/err.h 33
lib/Text/BibTeX/Structure.pm 13
lib/Text/BibTeX/Value.pm 22
lib/Text/BibTeX.pm 11
t/nameformat.t 11
t/output.t 11
xscode/btxs_support.c 57
12 files changed (This is a version diff) 2659
@@ -17,11 +17,19 @@ my $builder = MyBuilder->new
    dist_author    => ['Alberto Simões <ambs@cpan.org>',
                       'Greg Ward <gward@python.net>'],
    needs_compiler => 1,
+   meta_merge => {
+        resources  => {
+            repository => 'http://github.com/ambs/Text-BibTeX',
+        },
+    },
    configure_requires => {
-                          'Module::Build' => '0.36' ,
+                          'Module::Build'        => '0.36',
                           'Config::AutoConf'     => '0.16',
                           'ExtUtils::LibBuilder' => '0.02',
    },
+   requires => {
+   	             'Scalar::Util' => '1.42',
+   },
    build_requires => {
                       'File::Copy'           => '0',
                       'Config::AutoConf'     => '0.16',
@@ -74,7 +82,7 @@ if ($^O =~ /mswin32/i) {
         unlink catfile($libdir, $target);
     }
 } else {
-    if ($Config{archname} =~ /^x86_64/) {
+    if ($Config{archname} =~ /^x86_64|^ppc64|^s390x|^aarch64/) {
         $libdir =~ s/\bbin\b/lib64/;
         if (!-d $libdir) {
             my $test = $libdir;
@@ -1,5 +1,14 @@
 Revision history for Perl module Text::BibTeX
 
+0.71 2015-05-28
+ * Fix segmentation fault when btparse fails parsing a long
+   entry. Thanks to Dale Evans.
+ * Stop using UNIVERSAL (5.21.3 requirement).
+   Thanks to Jitka Plesnikova
+
+0.70 2014-09-01
+ * Added metadata for metacpan.
+
 0.69 2013-02-27
  * Fixes in the distribution, namely adding versions to unversioned packages.
 
@@ -5,7 +5,7 @@
       "Greg Ward <gward@python.net>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Module::Build version 0.4205",
+   "generated_by" : "Module::Build version 0.4212",
    "license" : [
       "perl_5"
    ],
@@ -31,12 +31,17 @@
             "ExtUtils::LibBuilder" : "0.02",
             "Module::Build" : "0.36"
          }
+      },
+      "runtime" : {
+         "requires" : {
+            "Scalar::Util" : "1.42"
+         }
       }
    },
    "provides" : {
       "Text::BibTeX" : {
          "file" : "lib/Text/BibTeX.pm",
-         "version" : "0.69"
+         "version" : "0.71"
       },
       "Text::BibTeX::BibEntry" : {
          "file" : "lib/Text/BibTeX/Bib.pm",
@@ -79,7 +84,8 @@
          "version" : "0.1"
       },
       "Text::BibTeX::StructuredEntry" : {
-         "file" : "lib/Text/BibTeX/Structure.pm"
+         "file" : "lib/Text/BibTeX/Structure.pm",
+         "version" : "0.1"
       },
       "Text::BibTeX::Value" : {
          "file" : "lib/Text/BibTeX/Value.pm",
@@ -90,7 +96,10 @@
    "resources" : {
       "license" : [
          "http://dev.perl.org/licenses/"
-      ]
+      ],
+      "repository" : {
+         "url" : "http://github.com/ambs/Text-BibTeX"
+      }
    },
-   "version" : "0.69"
+   "version" : "0.71"
 }
@@ -15,7 +15,7 @@ configure_requires:
   ExtUtils::LibBuilder: '0.02'
   Module::Build: '0.36'
 dynamic_config: 1
-generated_by: 'Module::Build version 0.4205, CPAN::Meta::Converter version 2.133380'
+generated_by: 'Module::Build version 0.4212, CPAN::Meta::Converter version 2.150001'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -24,7 +24,7 @@ name: Text-BibTeX
 provides:
   Text::BibTeX:
     file: lib/Text/BibTeX.pm
-    version: '0.69'
+    version: '0.71'
   Text::BibTeX::BibEntry:
     file: lib/Text/BibTeX/Bib.pm
     version: '0.1'
@@ -57,9 +57,13 @@ provides:
     version: '0.1'
   Text::BibTeX::StructuredEntry:
     file: lib/Text/BibTeX/Structure.pm
+    version: '0.1'
   Text::BibTeX::Value:
     file: lib/Text/BibTeX/Value.pm
     version: '0.1'
+requires:
+  Scalar::Util: '1.42'
 resources:
   license: http://dev.perl.org/licenses/
-version: '0.69'
+  repository: http://github.com/ambs/Text-BibTeX
+version: '0.71'
@@ -1,5 +1,4 @@
 
-
   Text::BibTeX
 ---------------------------------------------------------------------------
 
@@ -33,7 +32,7 @@
   btparse documentation is a further 30 pages).  You can find it at
   the btOOL home page:
 
-    http://starship.python.net/~gward/btOOL/
+    http://www.gerg.ca/software/btOOL/
 
 
   INSTALLATION
@@ -129,10 +129,10 @@ va_dcl
 #endif
 {
 #ifdef LL_K
-	static char text[LL_K*ZZLEXBUFSIZE+1];
+	static char text[LL_K*ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL
 	SetWordType *f[LL_K];
 #else
-	static char text[ZZLEXBUFSIZE+1];
+	static char text[ZZLEXBUFSIZE+1+1]; // allocate an extra byte for strncat() to drop a trailing NULL
 	SetWordType *f[1];
 #endif
 	SetWordType **miss_set;
@@ -164,7 +164,7 @@ va_dcl
             int freeSpace = (ZZLEXBUFSIZE+1) - strlen(text);
 #endif
 		if ( i>1 ) strcat(text, " ");
-		strncat(text, LATEXT(i), freeSpace);
+		strncat(text, LATEXT(i), freeSpace); // strncat(a,b,n) will actually write n+1 bytes because of the terminating NULL, unlike strlcpy (non-standard OpenBSD function) which writes exactly n.  this may end up dropping a character, but this is debug output from a failure case, so it doesn't matter much.
 		if ( !zzset_el((unsigned)LA(i), f[i-1]) ) break;
 	}
 	miss_set = va_arg(ap, SetWordType **);
@@ -869,7 +869,9 @@ sub get_options
 
 package Text::BibTeX::StructuredEntry;
 use strict;
-use vars qw(@ISA);
+use vars qw(@ISA $VERSION);
+$VERSION = 0.1;
+
 use Carp;
 
 @ISA = ('Text::BibTeX::Entry');
@@ -18,7 +18,7 @@
 package Text::BibTeX::Value;
 
 use strict;
-use UNIVERSAL 'isa';
+use Scalar::Util 'blessed';
 use Carp;
 
 use vars qw'$VERSION';
@@ -206,7 +206,7 @@ sub new
          if ref $sval eq 'ARRAY' && @$sval == 2;
       croak "simple value is neither a two-element array ref " .
             "nor a Text::BibTeX::SimpleValue object"
-         unless isa ($sval, 'Text::BibTeX::SimpleValue');
+         unless blessed($sval) && $sval->isa('Text::BibTeX::SimpleValue');
       push (@$self, $sval);
    }
 
@@ -24,7 +24,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $AUTOLOAD);
 require Exporter;
 require DynaLoader;
 
-our $VERSION='0.69';
+our $VERSION='0.71';
 
 @ISA = qw(Exporter DynaLoader);
 %EXPORT_TAGS = (nodetypes => [qw(BTAST_STRING BTAST_MACRO BTAST_NUMBER)],
@@ -104,7 +104,7 @@ $DEBUG = 1;
     my $name9   = Text::BibTeX::Name->new('Šomeone-Šomething Smith');
     is decode_utf8($formatter->apply($name9)), 'Š.-Š.';
 
-    my $formatter = Text::BibTeX::NameFormat->new('f', 1);
+    $formatter = Text::BibTeX::NameFormat->new('f', 1);
     my $name10   = Text::BibTeX::Name->new('{Šomeone-Šomething} Smith');
     is decode_utf8($formatter->apply($name10)), 'Š.';
 
@@ -34,7 +34,7 @@ ok($entry->parse_ok);
 $new_text = $entry->print_s;
 
 like $new_text => qr/^\@article\{homer97,\s*$/m;
-like $new_text => qr/^\s*author\s*=\s*{H{\\"o}mer Simpson \\"und Ned Flanders},\s*$/m;
+like $new_text => qr/^\s*author\s*=\s*\{H\{\\"o\}mer Simpson \\"und Ned Flanders\},\s*$/m;
 like $new_text => qr/^\s*title\s*=\s*[{"]Territorial[^}"]*Suburbia[}"],\s*$/m;
 like $new_text => qr/^\s*journal\s*=\s*[{"]Journal[^\}]*Studies[}"],\s*$/m;
 like $new_text => qr/^\s*year\s*=\s*[{"]1997[}"],\s*$/m;
@@ -264,7 +264,7 @@ convert_value_entry (AST *top, HV *entry, boolean preserve)
 {
    HV *    lines;                 /* line numbers of entry and its fields */
    AST *   item,
-       *   prev_item;
+       *   prev_item = NULL;
    int     last_line;
    char *  value;
    SV *    sv_value;
@@ -282,11 +282,13 @@ convert_value_entry (AST *top, HV *entry, boolean preserve)
    item = NULL;
    while (item = bt_next_value (top, item, NULL, NULL))
       prev_item = item;
-   last_line = prev_item->line;
-   hv_store (lines, "STOP", 4, newSViv (last_line), 0);
+   if (prev_item) {
+      last_line = prev_item->line;
+      hv_store (lines, "STOP", 4, newSViv (last_line), 0);
 
-   /* Store the line number hash in the entry hash */
-   hv_store (entry, "lines", 5, newRV ((SV *) lines), 0);
+      /* Store the line number hash in the entry hash */
+      hv_store (entry, "lines", 5, newRV ((SV *) lines), 0);
+   }
 
    /* And get the value of the entry as a single string (fully processed) */