fixed rt.cpan.org#122852 and rt.cpan.org#122825

This commit is contained in:
Thomas von Dein
2017-09-25 09:27:43 +02:00
parent 30efd79d63
commit ca983f02c1
4 changed files with 67 additions and 38 deletions

29
MANIFEST Normal file
View File

@@ -0,0 +1,29 @@
MANIFEST
bin/stresstest.sh
bin/note
mysql/permissions
mysql/sql
mysql/install.sh
mysql/README
VERSION
config/rc
config/noterc
install.sh
README
UPGRADE
note.pod
TODO
t/run.t
NOTEDB/mysql.pm
NOTEDB/text.pm
NOTEDB/dumper.pm
NOTEDB/pwsafe3.pm
NOTEDB/dbm.pm
NOTEDB/README
NOTEDB/binary.pm
NOTEDB/general.pm
Changelog
NOTEDB.pm
Makefile.PL
META.yml
META.json

View File

@@ -1,17 +1,17 @@
use ExtUtils::MakeMaker; use ExtUtils::MakeMaker;
my %optional = ( my %optional = (
'Crypt::CBC' => "Required by encryption support", 'Crypt::CBC' => "Required by encryption support",
'Crypt::Rijndael' => "Required by encryption support", 'Crypt::Rijndael' => "Required by encryption support",
'Data::Dumper' => "Required by dumper DB backend", 'Data::Dumper' => "Required by dumper DB backend",
'MIME::Base64' => "Required by varios optional backends", 'MIME::Base64' => "Required by varios optional backends",
'Storable' => "Required by text DB backend", 'Storable' => "Required by text DB backend",
'Config::General' => "Required by general DB backend", 'Config::General' => "Required by general DB backend",
'DB_File' => "Required by dbm DB backend", 'DB_File' => "Required by dbm DB backend",
'DBI' => "Required by mysql DB backend", 'DBI' => "Required by mysql DB backend",
'DBD::mysql' => "Required by mysql DB backend", 'DBD::mysql' => "Required by mysql DB backend",
'Crypt::PWSafe3' => "Required by Password Safe v3 backend" 'Crypt::PWSafe3' => "Required by Password Safe v3 backend"
); );
foreach my $module (sort keys %optional) { foreach my $module (sort keys %optional) {
eval "require $module"; eval "require $module";
@@ -22,20 +22,20 @@ foreach my $module (sort keys %optional) {
WriteMakefile( WriteMakefile(
'NAME' => 'NOTEDB', 'NAME' => 'note',
'VERSION_FROM' => 'NOTEDB.pm', # finds $VERSION 'VERSION_FROM' => 'bin/note', # finds $VERSION
'EXE_FILES' => [ 'bin/note' ], 'EXE_FILES' => [ 'bin/note' ],
'PREREQ_PM' => { 'PREREQ_PM' => {
'IO::File' => 0, 'IO::File' => 0,
'FileHandle' => 0, 'FileHandle' => 0,
'File::Spec' => 0, 'File::Spec' => 0,
'File::Glob' => 0, 'File::Glob' => 0,
'FileHandle' => 0, 'FileHandle' => 0,
'Getopt::Long' => 0, 'Getopt::Long' => 0,
'Fcntl' => 0, 'Fcntl' => 0,
'IO::Seekable' => 0, 'IO::Seekable' => 0,
'YAML' => 0, 'YAML' => 0,
}, },
($ExtUtils::MakeMaker::VERSION ge '6.31'? ('LICENSE' => 'perl', ) : ()), ($ExtUtils::MakeMaker::VERSION ge '6.31'? ('LICENSE' => 'perl', ) : ()),
'clean' => { FILES => 't/*.out t/test.cfg *~ */*~' } 'clean' => { FILES => 't/*.out t/test.cfg *~ */*~' }
); );

View File

@@ -2,7 +2,7 @@
# this is a generic module, used by note database # this is a generic module, used by note database
# backend modules. # backend modules.
# #
# Copyright (c) 2000-2015 T.v.Dein <tlinden@cpan.org> # Copyright (c) 2000-2017 T.v.Dein <tlinden@cpan.org>
package NOTEDB; package NOTEDB;
@@ -10,7 +10,7 @@ package NOTEDB;
use Exporter (); use Exporter ();
use vars qw(@ISA @EXPORT $crypt_supported); use vars qw(@ISA @EXPORT $crypt_supported);
$NOTEDB::VERSION = "1.44"; $NOTEDB::VERSION = "1.45";
BEGIN { BEGIN {
# make sure, it works, otherwise encryption # make sure, it works, otherwise encryption

View File

@@ -97,7 +97,7 @@ my (
# internals # internals
# #
$TYPE, $mode, $NoteKey, %Color, @LastTopic, $timelen, $maxlen, $TYPE, $mode, $NoteKey, %Color, @LastTopic, $timelen, $maxlen,
$version, $CurTopic, $CurDepth, $WantTopic, $db, $VERSION, $CurTopic, $CurDepth, $WantTopic, $db,
$sizeof, %TP, $TreeType, $ListType, $SetTitle, $clearstring, $sizeof, %TP, $TreeType, $ListType, $SetTitle, $clearstring,
@ArgTopics, $key, $typedef, @NumBlock, $has_nothing, @completion_topics, @completion_notes, @ArgTopics, $key, $typedef, @NumBlock, $has_nothing, @completion_topics, @completion_notes,
@randomlist, $hardparams @randomlist, $hardparams
@@ -144,7 +144,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc");
$USER = getlogin || getpwuid($<); $USER = getlogin || getpwuid($<);
chomp $USER; chomp $USER;
$TOPIC = 1; $TOPIC = 1;
$version = "1.3.24"; $VERSION = "1.3.24";
$CurDepth = 1; # the current depth inside the topic "directory" structure... $CurDepth = 1; # the current depth inside the topic "directory" structure...
$maxlen = "auto"; $maxlen = "auto";
$timelen = 22; $timelen = 22;
@@ -296,7 +296,7 @@ else {
} }
} }
elsif ($opt_v) { elsif ($opt_v) {
print "This is note $version by Thomas Linden <tom at linden dot at>.\n"; print "This is note $VERSION by Thomas Linden <tom at linden dot at>.\n";
exit(0); exit(0);
} }
elsif ($opt_h) { elsif ($opt_h) {
@@ -485,7 +485,7 @@ if ($conf{cache}) {
# add the backend version to the note version: # add the backend version to the note version:
$version .= ", " . $conf{dbdriver} . " " . $db->version(); $VERSION .= ", " . $conf{dbdriver} . " " . $db->version();
# main loop: ############### # main loop: ###############
@@ -1302,7 +1302,7 @@ sub interactive {
sub usage sub usage
{ {
print qq~This is the program note $version by Thomas Linden (c) 1999-2009. print qq~This is the program note $VERSION by Thomas Linden (c) 1999-2009.
It comes with absolutely NO WARRANTY. It is distributed under the It comes with absolutely NO WARRANTY. It is distributed under the
terms of the GNU General Public License. Use it at your own risk :-) terms of the GNU General Public License. Use it at your own risk :-)
@@ -1442,7 +1442,7 @@ sub output {
$R = $BORDERC . "]" . $_BORDERC; $R = $BORDERC . "]" . $_BORDERC;
} }
$PathLen = length($PATH); # will be ZERO, if not in TOPIC mode! $PathLen = length($PATH); # will be ZERO, if not in TOPIC mode!
$VersionLen = length($version) + 7; $VersionLen = length($VERSION) + 7;
if ($TYPE ne "SINGLE") { if ($TYPE ne "SINGLE") {
if (!$SetTitle) { if (!$SetTitle) {
@@ -1460,10 +1460,10 @@ sub output {
print $LONGSPC if ($conf{printlines}); print $LONGSPC if ($conf{printlines});
} }
if ($TOPIC) { if ($TOPIC) {
print C $TOPICC . "$PATH $_TOPICC$SP" . " note $version $R\n"; print C $TOPICC . "$PATH $_TOPICC$SP" . " note $VERSION $R\n";
} }
else { else {
print C $NOTEC . "note$_NOTEC$SP" . " note $version $R\n"; print C $NOTEC . "note$_NOTEC$SP" . " note $VERSION $R\n";
} }
print C $LINE if ($conf{printlines}); print C $LINE if ($conf{printlines});
} }
@@ -1669,7 +1669,7 @@ sub help {
print C qq~$BORDERC print C qq~$BORDERC
----------------------------------------------------------------------$_BORDERC $TOPICC ----------------------------------------------------------------------$_BORDERC $TOPICC
HELP for interactive note $version HELP for interactive note $VERSION
$_TOPICC $NOTEC $_TOPICC $NOTEC
The following commands are available: The following commands are available:
$L List notes. L=long, with timestamp and l=short without timestamp. $L List notes. L=long, with timestamp and l=short without timestamp.