From ca983f02c101090f24e0f9d46a1b5f3685b09e07 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Mon, 25 Sep 2017 09:27:43 +0200 Subject: [PATCH] fixed rt.cpan.org#122852 and rt.cpan.org#122825 --- MANIFEST | 29 ++++++++++++++++++++++++++++ Makefile.PL | 54 ++++++++++++++++++++++++++--------------------------- NOTEDB.pm | 4 ++-- bin/note | 18 +++++++++--------- 4 files changed, 67 insertions(+), 38 deletions(-) create mode 100644 MANIFEST diff --git a/MANIFEST b/MANIFEST new file mode 100644 index 0000000..8d4c5c6 --- /dev/null +++ b/MANIFEST @@ -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 diff --git a/Makefile.PL b/Makefile.PL index 124e4d8..bfa4c49 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,17 +1,17 @@ use ExtUtils::MakeMaker; my %optional = ( - 'Crypt::CBC' => "Required by encryption support", - 'Crypt::Rijndael' => "Required by encryption support", - 'Data::Dumper' => "Required by dumper DB backend", - 'MIME::Base64' => "Required by varios optional backends", - 'Storable' => "Required by text DB backend", - 'Config::General' => "Required by general DB backend", - 'DB_File' => "Required by dbm DB backend", - 'DBI' => "Required by mysql DB backend", - 'DBD::mysql' => "Required by mysql DB backend", - 'Crypt::PWSafe3' => "Required by Password Safe v3 backend" - ); + 'Crypt::CBC' => "Required by encryption support", + 'Crypt::Rijndael' => "Required by encryption support", + 'Data::Dumper' => "Required by dumper DB backend", + 'MIME::Base64' => "Required by varios optional backends", + 'Storable' => "Required by text DB backend", + 'Config::General' => "Required by general DB backend", + 'DB_File' => "Required by dbm DB backend", + 'DBI' => "Required by mysql DB backend", + 'DBD::mysql' => "Required by mysql DB backend", + 'Crypt::PWSafe3' => "Required by Password Safe v3 backend" + ); foreach my $module (sort keys %optional) { eval "require $module"; @@ -22,20 +22,20 @@ foreach my $module (sort keys %optional) { WriteMakefile( - 'NAME' => 'NOTEDB', - 'VERSION_FROM' => 'NOTEDB.pm', # finds $VERSION + 'NAME' => 'note', + 'VERSION_FROM' => 'bin/note', # finds $VERSION 'EXE_FILES' => [ 'bin/note' ], - 'PREREQ_PM' => { - 'IO::File' => 0, - 'FileHandle' => 0, - 'File::Spec' => 0, - 'File::Glob' => 0, - 'FileHandle' => 0, - 'Getopt::Long' => 0, - 'Fcntl' => 0, - 'IO::Seekable' => 0, - 'YAML' => 0, - }, - ($ExtUtils::MakeMaker::VERSION ge '6.31'? ('LICENSE' => 'perl', ) : ()), - 'clean' => { FILES => 't/*.out t/test.cfg *~ */*~' } -); + 'PREREQ_PM' => { + 'IO::File' => 0, + 'FileHandle' => 0, + 'File::Spec' => 0, + 'File::Glob' => 0, + 'FileHandle' => 0, + 'Getopt::Long' => 0, + 'Fcntl' => 0, + 'IO::Seekable' => 0, + 'YAML' => 0, + }, + ($ExtUtils::MakeMaker::VERSION ge '6.31'? ('LICENSE' => 'perl', ) : ()), + 'clean' => { FILES => 't/*.out t/test.cfg *~ */*~' } + ); diff --git a/NOTEDB.pm b/NOTEDB.pm index 924faf8..7e7f5ac 100644 --- a/NOTEDB.pm +++ b/NOTEDB.pm @@ -2,7 +2,7 @@ # this is a generic module, used by note database # backend modules. # -# Copyright (c) 2000-2015 T.v.Dein +# Copyright (c) 2000-2017 T.v.Dein package NOTEDB; @@ -10,7 +10,7 @@ package NOTEDB; use Exporter (); use vars qw(@ISA @EXPORT $crypt_supported); -$NOTEDB::VERSION = "1.44"; +$NOTEDB::VERSION = "1.45"; BEGIN { # make sure, it works, otherwise encryption diff --git a/bin/note b/bin/note index cd83dab..1850642 100755 --- a/bin/note +++ b/bin/note @@ -97,7 +97,7 @@ my ( # internals # $TYPE, $mode, $NoteKey, %Color, @LastTopic, $timelen, $maxlen, - $version, $CurTopic, $CurDepth, $WantTopic, $db, + $VERSION, $CurTopic, $CurDepth, $WantTopic, $db, $sizeof, %TP, $TreeType, $ListType, $SetTitle, $clearstring, @ArgTopics, $key, $typedef, @NumBlock, $has_nothing, @completion_topics, @completion_notes, @randomlist, $hardparams @@ -144,7 +144,7 @@ $CONF = File::Spec->catfile($ENV{HOME}, ".noterc"); $USER = getlogin || getpwuid($<); chomp $USER; $TOPIC = 1; -$version = "1.3.24"; +$VERSION = "1.3.24"; $CurDepth = 1; # the current depth inside the topic "directory" structure... $maxlen = "auto"; $timelen = 22; @@ -296,7 +296,7 @@ else { } } elsif ($opt_v) { - print "This is note $version by Thomas Linden .\n"; + print "This is note $VERSION by Thomas Linden .\n"; exit(0); } elsif ($opt_h) { @@ -485,7 +485,7 @@ if ($conf{cache}) { # add the backend version to the note version: -$version .= ", " . $conf{dbdriver} . " " . $db->version(); +$VERSION .= ", " . $conf{dbdriver} . " " . $db->version(); # main loop: ############### @@ -1302,7 +1302,7 @@ sub interactive { 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 terms of the GNU General Public License. Use it at your own risk :-) @@ -1442,7 +1442,7 @@ sub output { $R = $BORDERC . "]" . $_BORDERC; } $PathLen = length($PATH); # will be ZERO, if not in TOPIC mode! - $VersionLen = length($version) + 7; + $VersionLen = length($VERSION) + 7; if ($TYPE ne "SINGLE") { if (!$SetTitle) { @@ -1460,10 +1460,10 @@ sub output { print $LONGSPC if ($conf{printlines}); } if ($TOPIC) { - print C $TOPICC . "$PATH $_TOPICC$SP" . " note $version $R\n"; + print C $TOPICC . "$PATH $_TOPICC$SP" . " note $VERSION $R\n"; } 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}); } @@ -1669,7 +1669,7 @@ sub help { print C qq~$BORDERC ----------------------------------------------------------------------$_BORDERC $TOPICC -HELP for interactive note $version +HELP for interactive note $VERSION $_TOPICC $NOTEC The following commands are available: $L List notes. L=long, with timestamp and l=short without timestamp.