├── CREDITS ├── ChangeLog ├── INSTALL ├── LICENSE ├── README ├── README.md ├── VERSION ├── bump_version.pl ├── deps ├── Class-MethodMaker │ ├── Build.PL │ ├── Changes │ ├── Generate.pm │ ├── INSTALL │ ├── MANIFEST │ ├── MANIFEST.SKIP │ ├── META.yml │ ├── Makefile.PL │ ├── MethodMaker.xs │ ├── README │ ├── SIGNATURE │ ├── TODO │ ├── VERSION │ ├── benchmark │ │ └── lexical.pl │ ├── cmmg.pl │ ├── components │ │ ├── CommonMethods.pm │ │ ├── array.m │ │ ├── hash.m │ │ └── scalar.m │ ├── configure │ ├── end.pod │ ├── examples │ │ └── simple1 │ ├── generate.PL │ ├── lib │ │ └── Class │ │ │ ├── .placeholder │ │ │ ├── MethodMaker.pm │ │ │ └── MethodMaker │ │ │ ├── Constants.pm │ │ │ ├── Engine.pm │ │ │ ├── OptExt.pm │ │ │ └── V1Compat.pm │ └── t │ │ ├── 0-signature.t │ │ ├── array.t │ │ ├── basic.t │ │ ├── diffclass.t │ │ ├── hash.t │ │ ├── new.t │ │ ├── redefine-warnings.t │ │ ├── scalar.t │ │ ├── test.pm │ │ ├── test_v1.pm │ │ ├── v1_abstract.t │ │ ├── v1_boolean.t │ │ ├── v1_code.t │ │ ├── v1_copy.t │ │ ├── v1_counter.t │ │ ├── v1_get_concat.t │ │ ├── v1_get_set.t │ │ ├── v1_get_set_hi.t │ │ ├── v1_hash.t │ │ ├── v1_key_attrib.t │ │ ├── v1_key_with_create.t │ │ ├── v1_list.t │ │ ├── v1_method.t │ │ ├── v1_new.t │ │ ├── v1_new_hash_with_init.t │ │ ├── v1_object.t │ │ ├── v1_object_list.t │ │ ├── v1_object_tie_hash.t │ │ ├── v1_object_tie_list.t │ │ ├── v1_set_once.t │ │ ├── v1_set_once_static.t │ │ ├── v1_singleton.t │ │ ├── v1_static_get_set.t │ │ ├── v1_static_hash.t │ │ ├── v1_static_list.t │ │ ├── v1_tie_hash.t │ │ ├── v1_tie_list.t │ │ └── v1_tie_scalar.t ├── GnuPG-Interface │ ├── COPYING │ ├── ChangeLog │ ├── MANIFEST │ ├── META.yml │ ├── Makefile.PL │ ├── NEWS │ ├── README │ ├── SIGNATURE │ ├── THANKS │ ├── VERSION │ ├── lib │ │ └── GnuPG │ │ │ ├── Fingerprint.pm │ │ │ ├── Handles.pm │ │ │ ├── Interface.pm │ │ │ ├── Key.pm │ │ │ ├── Options.pm │ │ │ ├── PrimaryKey.pm │ │ │ ├── PublicKey.pm │ │ │ ├── SecretKey.pm │ │ │ ├── Signature.pm │ │ │ ├── SubKey.pm │ │ │ └── UserId.pm │ ├── t │ │ ├── Fingerprint.t │ │ ├── GnuPG │ │ │ ├── ComparableFingerprint.pm │ │ │ ├── ComparableKey.pm │ │ │ ├── ComparablePrimaryKey.pm │ │ │ ├── ComparablePublicKey.pm │ │ │ ├── ComparableSecretKey.pm │ │ │ ├── ComparableSignature.pm │ │ │ ├── ComparableSubKey.pm │ │ │ └── ComparableUserId.pm │ │ ├── Interface.t │ │ ├── MyTest.pm │ │ ├── MyTestSpecific.pm │ │ ├── UserId.t │ │ ├── clearsign.t │ │ ├── decrypt.t │ │ ├── detach_sign.t │ │ ├── encrypt.t │ │ ├── encrypt_symmetrically.t │ │ ├── export_keys.t │ │ ├── get_public_keys.t │ │ ├── get_secret_keys.t │ │ ├── import_keys.t │ │ ├── list_public_keys.t │ │ ├── list_secret_keys.t │ │ ├── list_sigs.t │ │ ├── passphrase_handling.t │ │ ├── sign.t │ │ ├── sign_and_encrypt.t │ │ ├── verify.t │ │ └── wrap_call.t │ └── test │ │ ├── encrypted.1.gpg │ │ ├── key.1.asc │ │ ├── options │ │ ├── passphrase │ │ ├── plain.1.txt │ │ ├── public-keys-sigs │ │ ├── 1.0.test │ │ ├── 1.1.test │ │ ├── 2.0.test │ │ └── 2.1.test │ │ ├── public-keys │ │ ├── 1.0.test │ │ ├── 1.1.test │ │ ├── 2.0.test │ │ └── 2.1.test │ │ ├── pubring.gpg │ │ ├── secret-keys │ │ ├── 1.0.test │ │ └── 2.0.test │ │ ├── secring.gpg │ │ ├── signed.1 │ │ └── signed.1.asc ├── README └── TermReadKey │ ├── Configure.pm │ ├── MANIFEST │ ├── META.yml │ ├── Makefile.PL │ ├── README │ ├── ReadKey.pm │ ├── ReadKey.xs │ ├── VERSION │ ├── genchars.pl │ ├── ppport.h │ └── test.pl ├── gpgdir ├── gpgdir.1 ├── install.pl ├── packaging ├── cd_rpmbuilder ├── gpgdir-nobuildreqs.spec ├── gpgdir-nodeps.spec ├── gpgdir.SlackBuild └── gpgdir.spec └── test ├── conf ├── broken.pw ├── test-gpg │ ├── pubring.gpg │ ├── secring.gpg │ └── trustdb.gpg └── test.pw ├── data-dir ├── 0 ├── .hidden ├── dir2 │ ├── .hidden │ ├── dir4 │ │ ├── .hidden │ │ ├── somefile │ │ └── somefile.txt │ ├── new-ascii │ └── new-ascii.txt ├── dir3 │ ├── .hidden │ ├── dir4 │ │ ├── .hidden │ │ ├── gpgdir-copy │ │ ├── gpgdir-copy.pl │ │ ├── random-binary-data │ │ └── random-binary-data.bin │ ├── file1 │ └── file2 ├── dir_no_top_level_files │ ├── dir2 │ │ ├── .hidden │ │ ├── dir4 │ │ │ ├── .hidden │ │ │ ├── somefile │ │ │ └── somefile.txt │ │ ├── new-ascii │ │ └── new-ascii.txt │ ├── dir3 │ │ ├── .hidden │ │ ├── dir4 │ │ │ ├── .hidden │ │ │ ├── blah │ │ │ ├── gpgdir-copy │ │ │ ├── gpgdir-copy.pl │ │ │ ├── random-binary-data │ │ │ ├── random-binary-data.bin │ │ │ └── somefile.txt │ │ ├── file1 │ │ └── file2 │ └── files_with_spaces │ │ ├── dir space │ │ └── one_file │ │ ├── dir2 space │ │ └── file1 │ │ ├── file1 space1 │ │ ├── file3 -dash │ │ └── normal_dir │ │ └── two_file ├── files_with_spaces │ ├── dir space │ │ └── one_file │ ├── dir2 space │ │ └── file1 │ ├── file1 space1 │ ├── file2 space2 │ ├── file3 -dash │ └── normal_dir │ │ └── two_file ├── multi-line-ascii ├── multi-line-ascii.txt ├── random-binary-data └── random-binary-data.bin ├── gpgdir_test.pl └── output └── README /CREDITS: -------------------------------------------------------------------------------- 1 | Per Ronny Westin 2 | - Found PLAINTEXT vs. DECRYPTION_OKAY return code bug for GnuPG 1.2.6. 3 | - Reported directory decryption bug in gpgdir-1.6. The result was the 4 | addition of the gpgdir test suite. 5 | 6 | Kai Raven 7 | - Bugfix in man page for file compression/decompression wording. 8 | 9 | Craig Needs 10 | - Suggested --gnupg-dir option, testing help. 11 | 12 | Chris P 13 | - Found bug where gpgdir would not decrypt files that contained spaces. 14 | 15 | Ian Scott 16 | - Reported "protocol error: expected SHM_GET_XXX got GOOD_PASSPHRASE" 17 | bug in GnuPG module. 18 | 19 | Mate Wierdl 20 | - Contributed patch (originally for the psad project) for building the 21 | RPM on x86_64 platforms. 22 | 23 | pyllyukko 24 | - Added the gpgdir.SlackBuild script (adapted from the psad project). 25 | 26 | Anthony Chivetta 27 | - Submitted patch to fix a bug where files named "0.gpg" could not be 28 | decrypted. 29 | - Submitted patch to implement the --overwrite-encrypted command line 30 | argument to allow previously encrypted files to be overwritten. This 31 | is useful for updating an encrypted directory with new versions of 32 | the previously encrypted files. 33 | 34 | Fermin Manzanedo 35 | - Suggested the --Symmetric option so that files can be encrypted/ 36 | decrypted via a symmetric cipher (GnuPG supports CAST5 by default). 37 | 38 | Franck Joncourt 39 | - Performed analysis of locale settings for fwknop installer and suggested 40 | using the LC_ALL environmental variable instead of the LANG variable 41 | (which is superseded by LC_* vars). 42 | - Suggested moving perl modules to the deps/ directory. This is to 43 | support the integration of the Cipherdyne projects with Debian. 44 | - Added Short description to the gpgdir man page. This fixes the 45 | following lintian warning: 46 | 47 | http://lintian.debian.org/tags/manpage-has-bad-whatis-entry.html 48 | - Suggested the appropriate bugfix to interface non-interactively with the 49 | wipe program (-f instead of -I in later versions). 50 | 51 | Lars Wilke 52 | - Reported a bug in missing the proper handling of files with spaces when 53 | using the --Wipe secure deletion mode. 54 | - Suggested the ability to encrypt/decrypt hidden files, and --Force now 55 | supports this. 56 | 57 | Ben Staude 58 | - Submitted a patch to allow multiple --Exclude patterns to be specified 59 | directly from the command line. 60 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation notes: 2 | 3 | QUICK AND EASY INSTALLATION INSTRUCTIONS: 4 | 5 | Just run the gpgdir installation script "install.pl" from the gpgdir 6 | sources directory: 7 | 8 | # ./install.pl 9 | 10 | If you are not installing as root, the install.pl script will install gpgdir 11 | along with required perl modules within your home directory. If you are 12 | installing as root, required perl modules will be installed in /usr/lib/gpgdir 13 | so as to not pollute the system perl library tree. The required perl modules 14 | are GnuPG::Interface, Class::MethodMaker, and Term::ReadKey, and these modules 15 | are placed in the deps/ directory. 16 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | README.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # gpgdir - Recursive Directory Encryption with GnuPG 2 | 3 | ## Summary 4 | gpgdir is a perl script that uses the CPAN GnuPG::Interface perl module to recursively encrypt and 5 | decrypt directories using gpg. gpgdir recursively descends through a directory in order to encrypt, 6 | decrypt, sign, or verify every file in a directory and all of its subdirectories. By default, the 7 | mtime and atime values of all files will be preserved upon encryption and decryption (this can be 8 | disabled with the --no-preserve-times option). Note that in --encrypt mode, gpgdir will delete the 9 | original files that it successfully encrypts (unless the --no-delete option is given). However, 10 | upon startup gpgdir first asks for a the decryption password to be sure that a dummy file can suc‐ 11 | cessfully be encrypted and decrypted. The initial test can be disabled with the --skip-test option 12 | so that a directory can easily be encrypted without having to also specify a password (this is con‐ 13 | sistent with gpg behavior). Also, note that gpgdir is careful not encrypt hidden files and directo‐ 14 | ries. After all, you probably don't want your ~/.gnupg directory or ~/.bashrc file to be encrypted. 15 | The GnuPG key gpgdir uses to encrypt/decrypt a directory is specified in ~/.gpgdirrc. Also, gpgdir 16 | can use the wipe program with the --Wipe command line option to securely delete the original unen‐ 17 | crypted files after they have been successfully encrypted. This elevates the security stance of 18 | gpgdir since it is more difficult to recover the unencrypted data associated with files from the 19 | filesystem after they are encrypted (unlink() does not erase data blocks even though a file is 20 | removed). 21 | 22 | Note that gpgdir is not designed to be a replacement for an encrypted filesystem solution like encfs 23 | or ecryptfs. Rather, it is an alternative that allows one to take advantage of the cryptographic 24 | properties offered by GnuPG in a recursive manner across an existing filesystem. 25 | 26 | ## Installation: 27 | Just run the install.pl script (as root) that comes with the gpgdir sources. 28 | 29 | ## License 30 | The gpgdir project is released as open source software under the terms of 31 | the **GNU General Public License (GPL v2)**. The latest release can be found 32 | at [http://www.cipherdyne.org/gpgdir/](http://www.cipherdyne.org/gpgdir/) 33 | 34 | * Author: Michael Rash 35 | * Download: http://www.cipherdyne.org/gpgdir 36 | * Version: 1.9.6 37 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.9.6 2 | -------------------------------------------------------------------------------- /bump_version.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | ############################################################################# 4 | # 5 | # File: bump_version.pl 6 | # 7 | # Purpose: Minor script to enforce consistency in gpgdir version tags. 8 | # 9 | ############################################################################# 10 | # 11 | 12 | use strict; 13 | 14 | my @files = qw( 15 | gpgdir 16 | test/gpgdir_test.pl 17 | ); 18 | 19 | my $new_version = $ARGV[0] or die "[*] $0 "; 20 | 21 | open F, '< VERSION' or die "[*] Could not open VERSION file: $!"; 22 | my $old_version = ; 23 | close F; 24 | chomp $old_version; 25 | 26 | print "[+] Updating software versions...\n"; 27 | for my $file (@files) { 28 | if ($file =~ /\.c/) { 29 | ###* Version: 1.8.4-pre2 30 | my $search_re = qr/^\*\s+Version:\s+$old_version/; 31 | my $replace_str = '* Version: ' . $new_version; 32 | system qq{perl -p -i -e 's|$search_re|} . 33 | qq{$replace_str|' $file}; 34 | } else { 35 | ### Version: 1.8.4 36 | my $search_re = qr/#\s+Version:\s+$old_version/; 37 | my $replace_str = '# Version: ' . $new_version; 38 | system qq{perl -p -i -e 's|$search_re|$replace_str|' $file}; 39 | ### my $version = '1.8.4'; 40 | $search_re = qr/^my\s+\x24version\s+=\s+'$old_version';/; 41 | $replace_str = q|my \x24version = '| . $new_version . q|';|; 42 | system qq{perl -p -i -e "s|$search_re|$replace_str|" $file}; 43 | } 44 | } 45 | system qq{perl -p -i -e 's|$old_version|$new_version|' VERSION}; 46 | 47 | exit 0; 48 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/Build.PL: -------------------------------------------------------------------------------- 1 | use Module::Build 0.26; # for autosplit to work correctly 2 | use File::Spec::Functions qw( catfile ); 3 | 4 | use lib '.'; 5 | use Generate qw( %GENERATE ); 6 | 7 | my $class = Module::Build->subclass 8 | ( 9 | class => 'CMM::AutoSplit', 10 | code => q{ 11 | sub ACTION_code { 12 | my ($self) = @_; 13 | # All installable stuff gets created in blib/ . 14 | # Create blib/arch to keep blib.pm happy 15 | my $blib = $self->blib; 16 | $self->add_to_cleanup($blib); 17 | File::Path::mkpath( File::Spec->catdir($blib, 'arch') ); 18 | 19 | foreach my $element (@{$self->build_elements}) { 20 | my $method = "process_${element}_files"; 21 | $self->$method(); 22 | } 23 | if ( my $autosplit = $self->autosplit ) { 24 | if ( ref $autosplit eq 'ARRAY' ) { 25 | $self->autosplit_file($_, $blib) 26 | for @$autosplit; 27 | } else { 28 | $self->autosplit_file($autosplit, $blib); 29 | } 30 | } 31 | } 32 | }, 33 | ); 34 | 35 | my $build = $class->new( 36 | module_name => 'Class::MethodMaker', 37 | dist_name => 'Class-MethodMaker', 38 | license => 'perl', 39 | dist_version => '2.08', 40 | sign => 1, 41 | dist_author => 'Martyn J. Pearce ', 42 | dist_abstract => 'create generic class accessor methods', 43 | PL_files => +{ 'generate.PL', [ values %GENERATE ] }, 44 | autosplit => [ values %GENERATE, 45 | catfile(qw(lib Class MethodMaker Engine.pm )) ], 46 | xs_files => +{ 'MethodMaker.xs' => 'lib/Class/MethodMaker.xs' }, 47 | ); 48 | 49 | $build->create_build_script; 50 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/Changes: -------------------------------------------------------------------------------- 1 | Revision History for Class::MethodMaker (versions 2) 2 | 3 | 2.11 Mar 24 2008 4 | - Drop Module::Build support 5 | (which was broken anyway for a long time, #19167, #16241, #17059, #15987, #13755) 6 | - Correct "use version" statements (#19585) 7 | 8 | 2.10 Apr 27 09:24:30 CEST 2007 9 | - Fixed SIGNATURE 10 | 11 | 2.09 Dec 5 0:31AM GMT 2006 12 | - Fixed compile problems with 5.9.4 upwards (rt.cpan.org #22413) 13 | 14 | 2.07 Apr 10 10:13PM GMT 2005 15 | - Fixed case error in Build.PL (rt.cpan.org #12107) 16 | - Re-jiggle INSTALL* settings in Makefile.PL 17 | 18 | 2.06 Mar 13 6:25PM GMT 2005 19 | - Fix for passing arguments to v1 object 20 | - Add patch to correctly allow single hashref initialization of hashes 21 | patch courtesy of tuck at whistlingfish dot net. 22 | 23 | 2.05 Jan 30 1:28 PM GMT 2005 24 | - Rejig build system, using ExtUtils::MakeMaker to play nicely 25 | 26 | 2.04 Oct 16 3:03 PM GMT 2004 27 | - Use Module::Build's compatibility mode to create a Makefile.PL 28 | - Add an argument of the subject object to default ctor calls 29 | 30 | 2.03 Oct 9 6:12 PM GMT 2004 31 | - Use Module::Build rather than ExtUtils::MakeMaker 32 | - Add XS code to set created sub names in profiler, etc. 33 | - Documentation tweaks 34 | 35 | 2.02 Apr 9 11:02 AM GMT 2004 36 | - Fix redefine warnings (with V1Compat) under perl-5.8.3 37 | 38 | 2.01 Apr 3 12:22 PM GMT 2004 39 | - Fix obscure handling of -hash_init with v1 hash 40 | - Fix hash in v1 mode to return reference to the actual storage 41 | - Make VERSION evaluate on single line to work with 42 | ExtUtils::MakeMaker. 43 | Patch contributed by Ed Avis (ed at membled dot com) 44 | 45 | 46 | 2.00 Nov 19 10:13 AM GMT 2003 47 | - Flatten list passed to * in v1 list 48 | - Fix buglet in object that called default_ctor method even when an 49 | explicit value was supplied 50 | - Add compatiblity support for boolean 51 | - Lots of documentation improvements 52 | - Add html target to Makefile.PL 53 | - Add implementation of _clear by default 54 | - Add *_clear to array 55 | - Add support for 5.6.x 56 | - Add new -singleton 57 | - Add compatiblity support for singleton 58 | - Add compatiblity support for get_concat 59 | - Add basic support for INTEGER type 60 | - Add compatiblity support for get_counter 61 | - Bug fixes to read callback 62 | - Add compatiblity support for key_{attrib,with_create} 63 | 64 | 2.00a09 Sep 18 11:04 AM GMT 2003 65 | - Add tie_scalar, static_hash, tie_hash for V1 66 | - Abandon lvalue methods 67 | - Add read & store callbacks (incomplete implementation; just enough 68 | for V1 methods) 69 | - Add code for V1 70 | - Add new_with_hash_with_init for V1 71 | - Correct handling of default in array to auto-instantiate for prior 72 | keys as needed 73 | - fix object_tie_list 74 | - add set_once from V1 75 | - add singleton for V1 76 | - add basic INTEGER handling 77 | - add get_concat, get_counter for V1 78 | - add key_attrib for V1 79 | 80 | 2.00a08 Jul 19 10:07 AM GMT 2003 81 | - Fixes for static_get_set 82 | - Add v1 tie_list, static_list, object_tie_list 83 | - Add 'new' 84 | - Add new_with_args for V1 85 | - Add basic hash handling 86 | - Many doc patches 87 | 88 | 2.00a07 May 10 8:11 AM GMT 2003 89 | - Tune object '*' method 90 | - Add !syntax, nested scope, simple name, repeated calls to V2 syntax 91 | - Add method-renaming syntax 92 | - Add basic array type 93 | - Make basic v1 lists work 94 | - Add tie functionality 95 | - Add v1 object_list 96 | 97 | 2.00a06 Wed Jun 19 6:56 PM GMT 2002 98 | - Add object v1 compatibility 99 | 100 | 2.00a05 Tue Jun 18 7:06 AM GMT 2002 101 | - Add '-default', '-default_ctor' options to scalar 102 | 103 | 2.00a04 Sun Jun 16 3:48 PM GMT 2002 104 | - Add '-forward' option to scalar 105 | 106 | 2.00a03 Sun Jun 16 12:44 AM GMT 2002 107 | - Add '-type' option to scalar 108 | 109 | 2.00a02 Tue Jun 11 8:10 PM GMT 2002 110 | - Add tests for scalar (v2) 111 | - Add warning(s) for v2 types appearing in v1 mode 112 | 113 | 2.00a01 Fri Jun 6 2:38 AM GMT 2002 114 | - Basic scalar implemented, passing get_set and static_get_set tests 115 | from v1 116 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/Generate.pm: -------------------------------------------------------------------------------- 1 | package Generate; 2 | 3 | use File::Spec::Functions qw( catfile ); 4 | use File::Basename qw( basename ); 5 | 6 | use base qw( Exporter ); 7 | our @EXPORT_OK = qw( %GENERATE ); 8 | 9 | our %GENERATE = ( map {; ($output = basename $_) =~ s/\.m/.pm/; 10 | $_ => catfile 'lib', 'Class', 'MethodMaker', $output } 11 | grep /\.m$/, glob(catfile 'components', '*') ); 12 | 13 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/INSTALL: -------------------------------------------------------------------------------- 1 | To install this module, use 2 | 3 | ./configure 4 | make 5 | make test 6 | make install 7 | 8 | This will install using /usr/bin/perl . If you wish to install using the perl 9 | in your PATH, use 'perl ./configure' instead of 'configure'. 10 | 11 | If you wish to install to a non-standard location, use 'configure 12 | --prefix=location' instead of 'configure'. 13 | 14 | So, to use the perl in your PATH to install to '/tmp', use 15 | 16 | perl ./configure --prefix=/tmp 17 | make 18 | make test 19 | make install 20 | 21 | Enjoy. 22 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/MANIFEST: -------------------------------------------------------------------------------- 1 | MANIFEST.SKIP 2 | Changes 3 | MANIFEST 4 | t/test.pm 5 | README 6 | cmmg.pl 7 | components/scalar.m 8 | components/array.m 9 | t/test_v1.pm 10 | end.pod 11 | lib/Class/.placeholder 12 | benchmark/lexical.pl 13 | components/hash.m 14 | lib/Class/MethodMaker/OptExt.pm 15 | lib/Class/MethodMaker/V1Compat.pm 16 | lib/Class/MethodMaker/Engine.pm 17 | t/0-signature.t 18 | t/array.t 19 | t/basic.t 20 | t/hash.t 21 | t/new.t 22 | t/scalar.t 23 | t/v1_abstract.t 24 | t/v1_code.t 25 | t/v1_copy.t 26 | t/v1_get_set.t 27 | t/v1_get_set_hi.t 28 | t/v1_hash.t 29 | t/v1_list.t 30 | t/v1_method.t 31 | t/v1_new.t 32 | t/v1_new_hash_with_init.t 33 | t/v1_object.t 34 | t/v1_object_list.t 35 | t/v1_object_tie_hash.t 36 | t/v1_object_tie_list.t 37 | t/v1_set_once.t 38 | t/v1_set_once_static.t 39 | t/v1_static_get_set.t 40 | t/v1_static_hash.t 41 | t/v1_static_list.t 42 | t/v1_tie_hash.t 43 | t/v1_tie_list.t 44 | t/v1_tie_scalar.t 45 | TODO 46 | lib/Class/MethodMaker.pm 47 | examples/simple1 48 | components/CommonMethods.pm 49 | lib/Class/MethodMaker/Constants.pm 50 | t/v1_counter.t 51 | t/v1_get_concat.t 52 | t/v1_key_attrib.t 53 | t/v1_key_with_create.t 54 | t/v1_singleton.t 55 | t/diffclass.t 56 | INSTALL 57 | t/v1_boolean.t 58 | t/redefine-warnings.t 59 | generate.PL 60 | META.yml 61 | Generate.pm 62 | MethodMaker.xs 63 | Makefile.PL 64 | configure 65 | SIGNATURE Added here by Module::Build 66 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/MANIFEST.SKIP: -------------------------------------------------------------------------------- 1 | ^(.*/)?CVS/.* 2 | ^(.*/)?.svn/.* 3 | ^Makefile(.old)?$ 4 | ^Build$ 5 | ^META.yml$ 6 | ^Clean$ 7 | ^RollingBuild$ 8 | ^blib/.* 9 | ^pm_to_blib$ 10 | ^.cvsignore$ 11 | ^MANIFEST.bak$ 12 | ^testcheck$ 13 | ^.*/\.cvsignore$ 14 | ^lib/Class/MethodMaker/(?:array|hash|scalar)\.pm$ 15 | ^lib/Class/MethodMaker/\.\#.*$ 16 | ^lib/Class/MethodMaker\.(?:bs|o|c)$ 17 | ^html(?:/.*)?$ 18 | ^(.*/)?.cvsignore$ 19 | ^INFO.yaml$ 20 | ^_build/ 21 | ^misc/ 22 | ^*~$ 23 | ^make-dist$ 24 | ^MethodMaker\.(?:bs|o|c)$ 25 | ^lib/Class/MethodMaker.xs$ 26 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/META.yml: -------------------------------------------------------------------------------- 1 | --- #YAML:1.0 2 | name: Class-MethodMaker 3 | version: 2.11 4 | abstract: a module for creating generic methods 5 | license: ~ 6 | author: 7 | - Martyn J. Pearce 8 | generated_by: ExtUtils::MakeMaker version 6.44 9 | distribution_type: module 10 | requires: 11 | meta-spec: 12 | url: http://module-build.sourceforge.net/META-spec-v1.3.html 13 | version: 1.3 14 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/Makefile.PL: -------------------------------------------------------------------------------- 1 | require 5.006; 2 | use strict; 3 | 4 | use Config qw( %Config ); 5 | use ExtUtils::MakeMaker qw( WriteMakefile ); 6 | use File::Basename qw( basename ); 7 | use File::Find qw( find ); 8 | use File::Spec::Functions qw( catfile ); 9 | use Getopt::Long qw( GetOptions ); 10 | 11 | use constant RAW_COMPS => map(join('.', basename($_, '.m'), 'pm'), 12 | glob(catfile qw(components *.m))); 13 | use constant COMPONENTS => 14 | +{map {catfile('components', join('.',basename($_,'.pm'),'m')) => 15 | catfile(qw(MethodMaker), $_)} RAW_COMPS}; 16 | use constant OPTEXT => catfile qw( lib Class MethodMaker OptExt.pm ); 17 | 18 | use constant MACOSX_INST => +{ 19 | INSTALLDIRS => "vendor", 20 | INSTALLVENDORBIN => $Config{installbin} || $Config{installvendorbin} || $Config{installsitebin}, 21 | INSTALLVENDORARCH => $Config{installarchlib} || $Config{installvendorarch} || $Config{installsitearch}, 22 | INSTALLVENDORLIB => $Config{installprivlib} || $Config{installvendorlib} || $Config{installsitelib}, 23 | INSTALLVENDORMAN1DIR => $Config{installman1dir}, 24 | INSTALLVENDORMAN3DIR => $Config{installman3dir}, 25 | }; 26 | 27 | my $macosx; 28 | # my OS X installation only works if given some wacky paths :-( 29 | GetOptions( 'macosx' => \$macosx ) 30 | or die "options parsing failed\n"; 31 | 32 | my %pm; 33 | find (sub { 34 | $File::Find::prune = 1, return 35 | if -d $_ and $_ eq 'CVS'; 36 | return unless /\.pm$/; 37 | (my $target = $File::Find::name) =~ 38 | s!^$File::Find::topdir/Class!\$(INST_LIBDIR)!; 39 | $pm{$File::Find::name} = $target; 40 | }, 41 | 'lib'); 42 | 43 | $pm{catfile qw( lib Class ), $_} = catfile '$(INST_LIBDIR)', $_ 44 | #$pm{catfile 'lib', $_} = $_ 45 | for values %{COMPONENTS()}; 46 | 47 | my %MakefileArgs = ( 48 | NAME => 'Class::MethodMaker', 49 | DISTNAME => 'Class-MethodMaker', 50 | VERSION => '2.11', 51 | AUTHOR => 'Martyn J. Pearce ', 52 | ABSTRACT => 'a module for creating generic methods', 53 | PREREQ_PM => +{ }, 54 | EXE_FILES => [ ], 55 | # Need this to stop Makefile treating Build.PL as a producer of Build as a 56 | # target for 'all'. 57 | PL_FILES => +{}, 58 | PM => \%pm, 59 | clean => +{ FILES => join(' ', qw( Build _build ), 60 | map(catfile(qw(lib Class MethodMaker), $_), 61 | RAW_COMPS), 62 | catfile(qw(lib Class MethodMaker.bs)), 63 | ) 64 | }, 65 | depend => +{ 66 | map({;catfile(qw( lib Class ), COMPONENTS->{$_}) => 67 | join(' ', 'cmmg.pl', %_, OPTEXT) . "\n\t" . 68 | join(' ', '$(PERL)', 'cmmg.pl', $_, '>', '$@') 69 | } 70 | keys %{COMPONENTS()} 71 | ) 72 | }, 73 | ); 74 | 75 | if ( $macosx ) { 76 | while ( my($k,$v) = each %{MACOSX_INST()} ) { 77 | $MakefileArgs{$k} = $v; 78 | } 79 | } 80 | 81 | WriteMakefile( %MakefileArgs ); 82 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/MethodMaker.xs: -------------------------------------------------------------------------------- 1 | #include "EXTERN.h" 2 | #include "perl.h" 3 | #include "XSUB.h" 4 | 5 | MODULE = Class::MethodMaker PACKAGE = Class::MethodMaker 6 | 7 | void 8 | set_sub_name(SV *sub, char *pname, char *subname, char *stashname) 9 | CODE: 10 | CvGV((GV*)SvRV(sub)) = gv_fetchpv(stashname, TRUE, SVt_PV); 11 | GvSTASH(CvGV((GV*)SvRV(sub))) = gv_stashpv(pname, 1); 12 | #ifdef gv_name_set 13 | gv_name_set(CvGV((GV*)SvRV(sub)), subname, strlen(subname), GV_NOTQUAL); 14 | #else 15 | GvNAME(CvGV((GV*)SvRV(sub))) = savepv(subname); 16 | GvNAMELEN(CvGV((GV*)SvRV(sub))) = strlen(subname); 17 | #endif 18 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/README: -------------------------------------------------------------------------------- 1 | Perl Module Class::MethodMaker: 2 | 3 | Easy building of Perl Classes 4 | 5 | Description: 6 | 7 | Modules & Classes: 8 | 9 | Class::MethodMaker - build instance components 10 | 11 | Executables: 12 | 13 | *None* 14 | 15 | Required Perl Version: 16 | 17 | 5.6.0 18 | 19 | Required Packages: 20 | 21 | *None* 22 | 23 | Required Executables: 24 | 25 | *None* 26 | 27 | Package Maintainer: 28 | 29 | Martyn J. Pearce 30 | 31 | Bugs: 32 | 33 | class-mmaker-devel@lists.sourceforge.net 34 | 35 | Patches: 36 | 37 | class-mmaker-devel@lists.sourceforge.net 38 | 39 | Discussion: 40 | 41 | class-mmaker-devel@lists.sourceforge.net 42 | 43 | Copyright: 44 | 45 | Copyright (c) 2004, 2003, 2002, 2001, 2000 Martyn J. Pearce. This program 46 | is free software; you can redistribute it and/or modify it under the same 47 | terms as Perl itself. 48 | 49 | Copyright (c) 1996 Organic Online. All rights reserved. This program is 50 | free software; you can redistribute it and/or modify it under the same 51 | terms as Perl itself. 52 | 53 | 3rd April, 2004 54 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/SIGNATURE: -------------------------------------------------------------------------------- 1 | This file contains message digests of all files listed in MANIFEST, 2 | signed via the Module::Signature module, version 0.55. 3 | 4 | To verify the content in this distribution, first make sure you have 5 | Module::Signature installed, then type: 6 | 7 | % cpansign -v 8 | 9 | It will check each file's integrity, as well as the signature's 10 | validity. If "==> Signature verified OK! <==" is not displayed, 11 | the distribution may already have been compromised, and you should 12 | not run its Makefile.PL or Build.PL. 13 | 14 | -----BEGIN PGP SIGNED MESSAGE----- 15 | Hash: SHA1 16 | 17 | SHA1 bc631a3da6c71db69930001f906ef88d43551e3a Changes 18 | SHA1 b684a759c6fcf6378506173aec3dedec843a3696 Generate.pm 19 | SHA1 efa8cb615886410be8de15f5a6925697f624d278 INSTALL 20 | SHA1 a9a33407fec2fc091f98179005334f08ab526242 MANIFEST 21 | SHA1 6a32646da8206c7b9c4fe7f10275e833ddbae77d MANIFEST.SKIP 22 | SHA1 369f047e8363b0c2f971e1b7cee3bf4e376e325f META.yml 23 | SHA1 5b84cdcaf0907a26e7b637eb8818b038b6a02007 Makefile.PL 24 | SHA1 da6df21dd8f9b0be2a93a888f944177c3231561d MethodMaker.xs 25 | SHA1 d56038cc296a6d4d1f73d776d4f933c7120fc883 README 26 | SHA1 bf8192c64eff9a9356b0e45ef812457c7d672883 TODO 27 | SHA1 c1fa07c05e01abd3456a21972ef20b5e0880bc4c benchmark/lexical.pl 28 | SHA1 7fd6930bf946850e2a8b0ad1d151066b6f72f581 cmmg.pl 29 | SHA1 a9d3eb3c3c292639d17d8fa09a9f4522f6beb684 components/CommonMethods.pm 30 | SHA1 b5316820246e0845b0a1f44c77c852b41009011b components/array.m 31 | SHA1 b9cab903b9a7c522d6d9f6c8a210716e5c49201a components/hash.m 32 | SHA1 3799c8fda252617e827ae3cf6b4f15426c8fb279 components/scalar.m 33 | SHA1 b3bf6a2c2660ba6cac156411bae40c9af9f3ed59 configure 34 | SHA1 ff41a37084f5f8f73f34da34c07ec5ff499c4343 end.pod 35 | SHA1 d39160a9f9faf6a3036888015958afd5e6360dab examples/simple1 36 | SHA1 76e80cf28137e0d2e623c5ae740f62fc2e7eb83e generate.PL 37 | SHA1 da39a3ee5e6b4b0d3255bfef95601890afd80709 lib/Class/.placeholder 38 | SHA1 d82440f5dda23670fc77fb67856172c64b868953 lib/Class/MethodMaker.pm 39 | SHA1 e9cb30df1d39b6bf81a3eae841bba358220ae5b6 lib/Class/MethodMaker/Constants.pm 40 | SHA1 11b8bbde960d6e0695bbb8e1fb679bbed2b390f1 lib/Class/MethodMaker/Engine.pm 41 | SHA1 58dba4e3ee75fda97d12a1dbd83cc5525f410c75 lib/Class/MethodMaker/OptExt.pm 42 | SHA1 350e418e58d45880b9767d9deb41f37e2b1a9ce9 lib/Class/MethodMaker/V1Compat.pm 43 | SHA1 c4ed60e219b8582ae5f9d4c2d4e5c63da90a1346 t/0-signature.t 44 | SHA1 2edb4c2a623e169a898cc754ab99483835cec50e t/array.t 45 | SHA1 cf7521c6e01eaa4a72210996a51b09b99dd27bfe t/basic.t 46 | SHA1 36f35089b3cdd95f16dcbe5f42c43e31182cbb88 t/diffclass.t 47 | SHA1 e4a4a3eb109145be7e8323476acc1f79af702786 t/hash.t 48 | SHA1 c1c5c7bc50fd8c72d33ecd3470a2217edd0241ab t/new.t 49 | SHA1 91e1bca16495461ea447c44f17f3d19b756e946a t/redefine-warnings.t 50 | SHA1 46332dbc223396c9fa80e57eefaca61f163471c6 t/scalar.t 51 | SHA1 77682285d4d29db2c49b7fc40485a1209067925b t/test.pm 52 | SHA1 732e5dd8fbc6e826bbc55f7366e74715fe8f8a47 t/test_v1.pm 53 | SHA1 de96e569ca75f94ba14b8c8f9036d1a6aaa47855 t/v1_abstract.t 54 | SHA1 aec7169b86abf57a80331f1012f09cef74d7e2f9 t/v1_boolean.t 55 | SHA1 a19f16a1cfb464030a3d999c712a5fabcabdb73b t/v1_code.t 56 | SHA1 9ca9ea8b2411ff369175cfa8e74be84deb7aa4ec t/v1_copy.t 57 | SHA1 fb36a6219b33dd94d2f9ff6ff8f9968c2b9b48fb t/v1_counter.t 58 | SHA1 98e9d1ed7b5708a62b2a3a1811fe0dc8fba6c373 t/v1_get_concat.t 59 | SHA1 d2ce4d4c89b4f9229a7656076521037b60636727 t/v1_get_set.t 60 | SHA1 9a3a2c64b7a2d72f26e405d627952883b1e16603 t/v1_get_set_hi.t 61 | SHA1 728140bc22c37e1ec2e26f3bcd3c502de6665859 t/v1_hash.t 62 | SHA1 b73834e0493049db8c9d86425a062adc842c48d9 t/v1_key_attrib.t 63 | SHA1 3d7f6e9679b0a8e64fc406e9340f39331f8fb2cc t/v1_key_with_create.t 64 | SHA1 d95c2095e154c71a0f474946abf170c49a7a2124 t/v1_list.t 65 | SHA1 b6261d8f15aeb979997b1ae307cc96f1fe15c0e5 t/v1_method.t 66 | SHA1 b39bb25d98caaf4e5f150dbc8601d900f7f148d0 t/v1_new.t 67 | SHA1 aec1f94089dd9c07e6cfcf7d789c786dda09b6da t/v1_new_hash_with_init.t 68 | SHA1 91e890b233c937cd9ebd3623852b1462e6bf24a9 t/v1_object.t 69 | SHA1 cab0122079ec1ea0343aedbbc8e7ff497301a9b6 t/v1_object_list.t 70 | SHA1 7e90429ccbda017fd1717cdfe5c652da31a0fdf7 t/v1_object_tie_hash.t 71 | SHA1 6236251cd4776ccbf9fe98743e7f1b49b5de9efb t/v1_object_tie_list.t 72 | SHA1 01fb49ad695edb3becd7eeda9d1178c0934389a5 t/v1_set_once.t 73 | SHA1 0e231b0445d5d1d8e89a02f06315b5ef4e19932d t/v1_set_once_static.t 74 | SHA1 4ac211e2ba4df0b9947db7d5a8c5fea651692b60 t/v1_singleton.t 75 | SHA1 d84798dc101e04ad45cec163ab01d6699fdead54 t/v1_static_get_set.t 76 | SHA1 2d098f5569e204a8cd6451286c0adac19f43d2f8 t/v1_static_hash.t 77 | SHA1 d20dfc640eeb947c2df7d549c1d83f198b7daf9a t/v1_static_list.t 78 | SHA1 4fd4d465539698a0f8b5e320a72bbcdf7a37dbe8 t/v1_tie_hash.t 79 | SHA1 efdde2ef3a7c3192b2a8449fe047e2d2bd57581c t/v1_tie_list.t 80 | SHA1 c9105cb7d439b524207ddbfdd5804c5ef7332790 t/v1_tie_scalar.t 81 | -----BEGIN PGP SIGNATURE----- 82 | Version: GnuPG v1.4.6 (GNU/Linux) 83 | 84 | iD8DBQFH6B5nrQV5awgKugcRAjLfAKC/b1LyP11NwWSHWXd9Ir8iQKF5twCg1p3C 85 | 2isgniBHAlP4BjFoNfQ1lAE= 86 | =MrFT 87 | -----END PGP SIGNATURE----- 88 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/TODO: -------------------------------------------------------------------------------- 1 | # Implement/Check scalar ties 2 | 3 | # Ensure new is available & documented for V2 4 | 5 | # Check tie behaviour with persistent files (e.g., picks up written values on 6 | # first read). 'Component exists' (as opposed to element exists) should be 7 | # mean 'tied' 8 | 9 | # Arrays - clear should not delete storage; reset sohuld 10 | # Arrays/General - tie should be invoked only upon assignment to the collection 11 | 12 | # Add to list methods: 13 | # Add x_clear to reset array without resetting storage (so storage exists, but no members) 14 | # x_count(1) - count set values; (2) - count defined values; (3) - count true values 15 | # x_grep x_map x_for 16 | # x_areset to return a list of indices of set items 17 | # ITERATOR 18 | # ITERATOR over set values (leave the user to do ITERATOR over defined values, 19 | # etc.) 20 | 21 | # Add x_setref to hash, array as discussed in respective 'x' method 22 | # documentation. 23 | 24 | # Remaining array tests 25 | 26 | # Integrate Class::MethodMaker::Util 27 | 28 | # Add _exists, _delete(as for hash) to array 29 | 30 | # test forward methods on tied attributes (they're set up in scalar.t, 31 | # array.t, hash.t?, just not actually tested) 32 | 33 | # Add introspection 34 | # Split doc. for scalar across actual methods, a la array 35 | # Tidy up doc writing to eliminiate unnecessary =pod =cut sequences 36 | 37 | # differ clear & reset; define behaviour in terms of storage (therefore, tie) 38 | # finish & document array 39 | # finish array.t (check test notes at end) 40 | # tie scalars 41 | # split methods into files in their own directory 42 | # split methodmaker further; turn V1 opts into own class hierarchy? 43 | # ; remove bits that are needed only for class 44 | # manufacture (OPTEXT, more?) 45 | 46 | # document 'new' 47 | 48 | # Check user-defined components still work as they used to 49 | 50 | # Filehandle, Dirhandle, Code components? 51 | 52 | # Automatic storage translation? Retrieval translation? Should this just be 53 | # considered a likely implementation of tie? Or implemented with tie? Or 54 | # would it be faster directly? This could also be used to implement tied data 55 | # _items_, as opposed to tied _components_. 56 | 57 | # Copy method (deep copy? shallow copy? probably an option for both) 58 | # freeze/thaw integration (is there really any value in doing this --- 59 | # storable already does it)? 60 | # Use of array-based classes? 61 | # Use of closures for linked-lists, other data-structures (i.e., the instance 62 | # is a subref that's closed over the data). 63 | # Use of closures as above for iterators? 64 | # Iterators over components 65 | # Destructor that unties any components 66 | 67 | # Finish Documentation 68 | # Reassign names so error messages come from "right" class name & method 69 | # Place doc. for data structures in middle of man page 70 | # Add +*_clear syntax to add in non-default methods 71 | # Add nonnull option 72 | # Add triggered & monitored types 73 | # Add ints, strings, timedates 74 | # Add enums 75 | # Document default_ctor simple value trick with -type to work only with class 76 | # types. 77 | # TODO from C::MM 1 78 | # Add trees, linked lists, non-destructive hashes, fib heaps 79 | # Integrate other CPAN data structures? 80 | # Mechanism to allow users to define templates of methods they commonly use 81 | # Test for error messages when new, catalalogue are given "standard" options 82 | # Add forwarding from one method to another with a different name. Add 83 | # mechanism for auto_naming, e.g., '*_name', where * is replaced by component 84 | # name, to allow methods to be forwarded to multiple components e.g., 85 | # { -forward => {mode => '*_mode'} }, qw/ st1 st2 / to allow st1_mode & 86 | # st2_mode 87 | # What to do with forwarding to a null value --- explicit check? 88 | # Require default value? Just let it happen? 89 | # Add writing out of source code to generated classes 90 | # Add default_count mechanism to array 91 | # Add parameter passed to default_ctor of array specifying slot ID 92 | # Add purely generated arrays/hashes; unable to set, both with & without a 93 | # finite limit. Are there CPAN modules for this? 94 | # Add _lock & _unlock methods to lock values. Limit each to certain classes? 95 | # Add ties 96 | 97 | # Add introspection capability for OODoc. See email from Marcel Gruenauer 98 | # 99 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/VERSION: -------------------------------------------------------------------------------- 1 | 2.11 2 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/benchmark/lexical.pl: -------------------------------------------------------------------------------- 1 | use Benchmark qw(cmpthese); 2 | 3 | package Foo; 4 | 5 | sub new { bless {slot => "blot"}, shift } 6 | 7 | sub getset_orig { 8 | my $self = shift; 9 | if (@_) { 10 | $self->{slot} = shift; 11 | } else { 12 | $self->{slot}; 13 | } 14 | } 15 | 16 | sub getset_fast { 17 | return $_[0]->{slot} if @_ == 1; 18 | return $_[0]->{slot} = $_[1]; 19 | } 20 | 21 | # lvalue doesn't play nicely with return :-( 22 | sub getset_lvalue { 23 | if ( @_ == 1 ) { 24 | $_[0]->{slot}; 25 | } else { 26 | $_[0]->{slot} = $_[1]; 27 | } 28 | } 29 | 30 | package main; 31 | 32 | my $obj = Foo->new(); 33 | 34 | cmpthese(-2, { 35 | getset_orig => sub { 36 | $_ = $obj->getset_orig(); 37 | $obj->getset_orig($_); 38 | }, 39 | getset_fast => sub { 40 | $_ = $obj->getset_fast(); 41 | $obj->getset_fast($_); 42 | }, 43 | getset_lvalue => sub { 44 | $_ = $obj->getset_lvalue(); 45 | $obj->getset_lvalue($_); 46 | }, 47 | }); 48 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/components/CommonMethods.pm: -------------------------------------------------------------------------------- 1 | 'INTEGER:*_incr' => sub { 2 | my $x = $names{'*'}; 3 | my $incr = @_ > 1 ? $_[1] : 1; 4 | $_[0]->$x($_[0]->$x()+$incr); 5 | }, 6 | 7 | 'INTEGER:*_decr' => sub { 8 | my $x = $names{'*'}; 9 | my $decr = @_ > 1 ? $_[1] : 1; 10 | $_[0]->$x($_[0]->$x()-$decr); 11 | }, 12 | 13 | 'INTEGER:*_zero' => sub { 14 | my $x = $names{'*'}; 15 | $_[0]->$x(0); 16 | }, 17 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/configure: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | # Pragma ------------------------------ 4 | 5 | use 5.006; 6 | use strict; 7 | 8 | # Utility ----------------------------- 9 | 10 | use Getopt::Long 2.19 qw( GetOptions ); 11 | 12 | my $prefix; 13 | GetOptions('prefix=s' => \$prefix,) 14 | or die "Options parsing failed"; 15 | 16 | my @cmd = ($^X => 'Makefile.PL'); 17 | push @cmd, "PREFIX=$prefix" 18 | if defined $prefix; 19 | 20 | exec @cmd; 21 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/end.pod: -------------------------------------------------------------------------------- 1 | =head1 EXAMPLES 2 | 3 | Z<> 4 | 5 | =head1 COMPATIBILITY NOTES 6 | 7 | Users porting from the v1 versions of Class::MethodMaker would do well to 8 | observe the following: 9 | 10 | =over 4 11 | 12 | =item ima_method_maker 13 | 14 | This class method is deprecated. It was a way round the fact the C::MM works 15 | out what class to create methods in by looking up the calling stack. It is 16 | unfortunate, for the first C::MM class in the calling stack that sets 17 | ima_method_maker to be false gets the method --- that may not be what is 18 | wanted (i.e., if one derived class calls another for C::MM work). 19 | 20 | By calling create_methods, the target class may is explicitly specified in the 21 | argument list. 22 | 23 | =back 24 | 25 | =head1 BUGS 26 | 27 | Z<> 28 | 29 | =head1 REPORTING BUGS 30 | 31 | Email the development mailing-list C 32 | 33 | =head1 AUTHOR 34 | 35 | Martyn J. Pearce 36 | 37 | =head1 COPYRIGHT 38 | 39 | Copyright (c) 2001--2004 Martyn J. Pearce. This program is free software; you 40 | can redistribute it and/or modify it under the same terms as Perl itself. 41 | 42 | =head1 SEE ALSO 43 | 44 | Z<> 45 | 46 | =cut 47 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/examples/simple1: -------------------------------------------------------------------------------- 1 | use strict; 2 | 3 | package MyClass; 4 | 5 | use Class::MethodMaker 6 | [ scalar => [qw/ name /], 7 | new => [qw/ new /], 8 | ]; 9 | 10 | package main; 11 | 12 | my $m = MyClass->new; 13 | my $n; 14 | $\ = "\n"; 15 | 16 | print $m->name_isset ? "true" : "false"; # false 17 | 18 | $m->name("foo"); 19 | $n = $m->name; 20 | print defined $n ? "->$n<-" : "*undef*"; # ->foo<- 21 | print $m->name_isset ? "true" : "false"; # true 22 | 23 | $m->name(undef); 24 | $n = $m->name; 25 | print defined $n ? "->$n<-" : "*undef*"; # *undef* 26 | print $m->name_isset ? "true" : "false"; # true 27 | 28 | $m->name_reset; 29 | $n = $m->name; 30 | print defined $n ? "->$n<-" : "*undef*"; # *undef* 31 | print $m->name_isset ? "true" : "false"; # false 32 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/generate.PL: -------------------------------------------------------------------------------- 1 | use Getopt::Long qw( GetOptions ); 2 | 3 | use lib '.'; 4 | use Generate qw( %GENERATE ); 5 | 6 | my $dump = 0; 7 | GetOptions( 'dump' => \$dump ) 8 | or die "options parsing failed\n"; 9 | 10 | if ( $dump ) { 11 | print "$_\t$GENERATE{$_}\n" 12 | for sort keys %GENERATE; 13 | exit 0; 14 | } 15 | 16 | while ( my ($input, $output) = each %GENERATE ) { 17 | my @cmd = ('./cmmg.pl', $input, '>', $output); 18 | my $cmd = join ' ', @cmd; 19 | print "$cmd\n"; 20 | system $cmd 21 | and die "$cmd failed: $?\n"; 22 | } 23 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/lib/Class/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/deps/Class-MethodMaker/lib/Class/.placeholder -------------------------------------------------------------------------------- /deps/Class-MethodMaker/lib/Class/MethodMaker/Constants.pm: -------------------------------------------------------------------------------- 1 | # (X)Emacs mode: -*- cperl -*- 2 | 3 | package Class::MethodMaker::Constants; 4 | 5 | =head1 NAME 6 | 7 | Class::MethodMaker::Constants 8 | 9 | =head1 SYNOPSIS 10 | 11 | Z<> 12 | 13 | =head1 DESCRIPTION 14 | 15 | Z<> 16 | 17 | =cut 18 | 19 | # ---------------------------------------------------------------------------- 20 | 21 | # Pragmas ----------------------------- 22 | 23 | require 5.006; 24 | use strict; 25 | use warnings; 26 | 27 | use Exporter; 28 | our @EXPORT_OK = qw( INTEGER ); 29 | 30 | # ---------------------------------------------------------------------------- 31 | 32 | # CLASS METHODS -------------------------------------------------------------- 33 | 34 | # ------------------------------------- 35 | # CLASS CONSTANTS 36 | # ------------------------------------- 37 | 38 | =head1 CLASS CONSTANTS 39 | 40 | Z<> 41 | 42 | =cut 43 | 44 | use constant INTEGER => '+INTEGER'; # Prefix to ensure clients don't just 45 | # assume the string: this value may well 46 | # change in the future 47 | 48 | # ---------------------------------------------------------------------------- 49 | 50 | =head1 EXAMPLES 51 | 52 | Z<> 53 | 54 | =head1 BUGS 55 | 56 | Z<> 57 | 58 | =head1 REPORTING BUGS 59 | 60 | Email the development mailing list C 61 | 62 | =head1 AUTHOR 63 | 64 | Martyn J. Pearce 65 | 66 | =head1 COPYRIGHT 67 | 68 | Copyright (c) 2003 Martyn J. Pearce. This program is free software; you can 69 | redistribute it and/or modify it under the same terms as Perl itself. 70 | 71 | =head1 SEE ALSO 72 | 73 | Z<> 74 | 75 | =cut 76 | 77 | 1; # keep require happy. 78 | 79 | __END__ 80 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/0-signature.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | print "1..1\n"; 4 | 5 | if ( ! eval { require Module::Signature; 1 } ) { 6 | print("ok 1 # skip ", 7 | "Next time around, consider install Module::Signature, ", 8 | "# so you can verify the integrity of this distribution.\n"); 9 | } elsif ( ! eval { require Socket; Socket::inet_aton('subkeys.pgp.net') } ) { 10 | print "ok 1 # skip ", "Cannot connect to the keyserver\n"; 11 | } else { 12 | (Module::Signature::verify() == Module::Signature::SIGNATURE_OK()) 13 | or print "not "; 14 | print "ok 1 # Valid signature\n"; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/basic.t: -------------------------------------------------------------------------------- 1 | # (X)Emacs mode: -*- cperl -*- 2 | 3 | use strict; 4 | 5 | =head1 Unit Test Package for Class::MethodMaker 6 | 7 | This package tests the basic compilation and working of Class::MethodMaker 8 | 9 | =cut 10 | 11 | use Data::Dumper qw( ); 12 | use FindBin 1.42 qw( $Bin ); 13 | use Test 1.13 qw( ok plan ); 14 | 15 | use lib $Bin; 16 | use test qw( DATA_DIR 17 | evcheck ); 18 | 19 | BEGIN { 20 | # 1 for compilation test, 21 | plan tests => 2, 22 | todo => [], 23 | } 24 | 25 | # ---------------------------------------------------------------------------- 26 | 27 | =head2 Test 1: compilation 28 | 29 | This test confirms that the test script and the modules it calls compiled 30 | successfully. 31 | 32 | =cut 33 | 34 | use Class::MethodMaker; 35 | 36 | ok 1, 1, 'compilation'; 37 | 38 | # ------------------------------------- 39 | 40 | =head2 Test 2: scalar 41 | 42 | =cut 43 | 44 | package bob; 45 | 46 | use Class::MethodMaker 47 | [ scalar =>[qw/ foo /] ]; 48 | 49 | package main; 50 | 51 | my $bob = bless {}, 'bob'; 52 | print Data::Dumper->Dump([ $bob ], [qw( bob )]) 53 | if $ENV{TEST_DEBUG}; 54 | $bob->foo("x"); 55 | print Data::Dumper->Dump([ $bob ], [qw( bob )]) 56 | if $ENV{TEST_DEBUG}; 57 | ok $bob->foo, "x", 'scalar ( 1)'; 58 | 59 | # ---------------------------------------------------------------------------- 60 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/diffclass.t: -------------------------------------------------------------------------------- 1 | # (X)Emacs mode: -*- cperl -*- 2 | 3 | use strict; 4 | 5 | =head1 Unit Test Package for Class::MethodMaker 6 | 7 | This package tests the ability of Class::MethodMaker to insert methods into a 8 | class other than the "Calling" class. 9 | 10 | =cut 11 | 12 | use Data::Dumper qw( Dumper ); 13 | use Fatal 1.02 qw( sysopen close ); 14 | use Fcntl 1.03 qw( :DEFAULT ); 15 | use File::stat qw( stat ); 16 | use FindBin 1.42 qw( $Bin $Script ); 17 | use IO::File 1.08 qw( ); 18 | use POSIX 1.03 qw( S_ISREG ); 19 | use Test 1.13 qw( ok plan ); 20 | 21 | use lib $Bin; 22 | use test qw( DATA_DIR 23 | evcheck restore_output save_output ); 24 | 25 | BEGIN { 26 | # 1 for compilation test, 27 | plan tests => 22, 28 | todo => [], 29 | } 30 | 31 | # ---------------------------------------------------------------------------- 32 | 33 | =head2 Test 1: compilation 34 | 35 | This test confirms that the test script and the modules it calls compiled 36 | successfully. 37 | 38 | =cut 39 | 40 | use Class::MethodMaker 41 | [ -target_class => 'X', 42 | scalar => [qw/ a /], 43 | -target_class => 'Y', 44 | scalar => [qw/ b /], 45 | ]; 46 | 47 | ok 1, 1, 'compilation'; 48 | 49 | # ------------------------------------- 50 | 51 | =head2 Test 2: bless 52 | 53 | =cut 54 | 55 | my ($x, $y); 56 | ok evcheck(sub { $x = bless {}, 'X'; $y = bless {}, 'Y'; }, 57 | 'bless ( 1)'), 1, 'bless ( 1)'; 58 | 59 | goto "TEST_$ENV{START_TEST}" 60 | if $ENV{START_TEST}; 61 | 62 | # ------------------------------------- 63 | 64 | =head2 Tests 3--22: simple non-static 65 | 66 | =cut 67 | 68 | { 69 | my $n; 70 | 71 | ok(evcheck(sub { $n = $x->a_isset; }, 'simple non-static ( 1)'), 1, 72 | 'simple non-static ( 1)'); 73 | ok ! $n; # simple non-static ( 2) 74 | ok(evcheck(sub { $n = $x->b_isset; }, 'simple non-static ( 3)'), 0, 75 | 'simple non-static ( 3)'); 76 | ok(evcheck(sub { $n = $y->b_isset; }, 'simple non-static ( 4)'), 1, 77 | 'simple non-static ( 4)'); 78 | 79 | ok(evcheck(sub { $x->a(4); }, 'simple non-static ( 5)'), 80 | 1, 'simple non-static ( 5)'); 81 | ok(evcheck(sub { $n = $x->a; }, 'simple non-static ( 6)'), 1, 82 | 'simple non-static ( 6)'); 83 | ok $n, 4, 'simple non-static ( 7)'; 84 | ok(evcheck(sub { $n = $x->a(7); }, 'simple non-static ( 8)'), 1, 85 | 'simple non-static ( 8)'); 86 | ok $n, 7, 'simple non-static ( 9)'; 87 | ok(evcheck(sub { $n = $x->a_isset; }, 'simple non-static (10)'), 1, 88 | 'simple non-static (10)'); 89 | ok $n; # simple non-static (11) 90 | ok(evcheck(sub { $n = $y->b_isset; }, 'simple non-static (12)'), 1, 91 | 'simple non-static (12)'); 92 | ok ! $n; # simple non-static (13) 93 | ok(evcheck(sub { $n = $x->a_reset; }, 'simple non-static (14)'), 1, 94 | 'simple non-static (14)'); 95 | ok(evcheck(sub { $n = $x->a_isset; }, 'simple non-static (15)'), 1, 96 | 'simple non-static (15)'); 97 | ok ! $n; # simple non-static (16) 98 | ok(evcheck(sub { $n = $x->a; }, 'simple non-static (17)'), 1, 99 | 'simple non-static (17)'); 100 | ok $n, undef, 'simple non-static (18)'; 101 | ok(evcheck(sub { $n = $x->a_isset; }, 'simple non-static (19)'), 1, 102 | 'simple non-static (19)'); 103 | ok ! $n; # simple non-static (20) 104 | } 105 | 106 | # ------------------------------------- 107 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/new.t: -------------------------------------------------------------------------------- 1 | # (X)Emacs mode: -*- cperl -*- 2 | 3 | use strict; 4 | 5 | =head1 Unit Test Package for Class::MethodMaker 6 | 7 | This package tests the scalar type of Class::MethodMaker 8 | 9 | =cut 10 | 11 | use FindBin 1.42 qw( $Bin $Script ); 12 | use Test 1.13 qw( ok plan ); 13 | 14 | use lib $Bin; 15 | use test qw( evcheck ); 16 | 17 | BEGIN { 18 | plan tests => 32, 19 | todo => [], 20 | } 21 | 22 | # ---------------------------------------------------------------------------- 23 | 24 | =head2 Test 1: compilation 25 | 26 | This test confirms that the test script and the modules it calls compiled 27 | successfully. 28 | 29 | =cut 30 | 31 | package X; 32 | 33 | use Class::MethodMaker 34 | [ new => 'new', 35 | new => [qw/ -hash new_hash_init /], 36 | new => [qw/ -init new_with_init 37 | -hash new_both /], 38 | ]; 39 | 40 | my @args_in_init; 41 | my $foo_called; 42 | my $bar_called; 43 | 44 | sub init { 45 | my ($self, @args) = @_; 46 | @args_in_init = @args; 47 | } 48 | 49 | sub foo { 50 | my ($self, $new) = @_; 51 | defined $new and $self->{'foo'} = $new; 52 | $foo_called = 1; 53 | $self->{'foo'}; 54 | } 55 | 56 | sub bar { 57 | my ($self, $new) = @_; 58 | defined $new and $self->{'bar'} = $new; 59 | $bar_called = 1; 60 | $self->{'bar'}; 61 | } 62 | 63 | package main; 64 | 65 | ok 1, 1, 'compilation'; 66 | 67 | # ------------------------------------- 68 | 69 | =head Tests 2--3: new 70 | 71 | =cut 72 | 73 | { 74 | my $o; 75 | 76 | ok evcheck(sub { $o = new X; }, 'new ( 1)'), 1, 'new ( 1)'; 77 | ok ref $o, 'X', 'new ( 2)'; 78 | } 79 | 80 | # ------------------------------------- 81 | 82 | =head Tests 4--9: new_with_init 83 | 84 | =cut 85 | 86 | { 87 | my $o; 88 | my @args = (1, 2, 3); 89 | ok(evcheck(sub { $o = X->new_with_init(@args) }, 'new_with_init ( 1)'), 1, 90 | 'new_with_init ( 1)'); 91 | ok ref $o, 'X', 'new_with_init ( 2)'; 92 | ok $#args_in_init, $#args, 'new_with_init ( 3)'; 93 | ok $args_in_init[$_], $args[$_], sprintf('new_with_init (%2d)', $_+4) 94 | for 0..$#args; 95 | 96 | @args_in_init = (); 97 | } 98 | 99 | # ------------------------------------- 100 | 101 | =head Tests 10--15: new_hash_init 102 | 103 | =cut 104 | 105 | { 106 | my $o; 107 | ok(evcheck(sub { $o = X->new_hash_init( 'foo' => 123, 'bar' => 456 ) }, 108 | 'new_hash_init ( 1)'), 1, 'new_hash_init ( 1)'); 109 | ok ref $o, 'X', 'new_hash_init ( 2)'; 110 | ok $foo_called, 1, 'new_hash_init ( 3)'; 111 | ok $bar_called, 1, 'new_hash_init ( 4)'; 112 | ok $o->foo, 123, 'new_hash_init ( 5)'; 113 | ok $o->bar, 456, 'new_hash_init ( 6)'; 114 | 115 | $foo_called = 0; 116 | $bar_called = 0; 117 | } 118 | # ------------------------------------- 119 | 120 | =head Tests 16--21: new_hash_init (taking hashref) 121 | 122 | =cut 123 | 124 | { 125 | my $o; 126 | $foo_called = 0; 127 | $bar_called = 0; 128 | 129 | ok(evcheck(sub { $o = X->new_hash_init({ 'foo' => 111, 'bar' => 444 }) }, 130 | 'new_hash_init (taking hashref) ( 1)'), 1, 131 | 'new_hash_init (taking hashref) ( 1)'); 132 | ok ref $o, 'X', 'new_hash_init (taking hashref) ( 2)'; 133 | ok $foo_called, 1, 'new_hash_init (taking hashref) ( 3)'; 134 | ok $bar_called, 1, 'new_hash_init (taking hashref) ( 4)'; 135 | ok $o->foo, 111, 'new_hash_init (taking hashref) ( 5)'; 136 | ok $o->bar, 444, 'new_hash_init (taking hashref) ( 6)'; 137 | 138 | $foo_called = 0; 139 | $bar_called = 0; 140 | } 141 | 142 | # ------------------------------------- 143 | 144 | =head Tests 22--32: new_hash_init (with init) 145 | 146 | =cut 147 | 148 | { 149 | my $o; 150 | 151 | my @args = ('foo' => 987, 'bar' => 654); 152 | ok(evcheck(sub { $o = X->new_both(@args) }, 153 | 'new_hash_init (with init) ( 1)'), 1, 154 | 'new_hash_init (with init) ( 1)'); 155 | ok ref $o, 'X', 'new_hash_init (with init) ( 2)'; 156 | ok $foo_called, 1, 'new_hash_init (with init) ( 3)'; 157 | ok $bar_called, 1, 'new_hash_init (with init) ( 4)'; 158 | ok $o->foo, 987, 'new_hash_init (with init) ( 5)'; 159 | ok $o->bar, 654, 'new_hash_init (with init) ( 6)'; 160 | ok $#args_in_init, $#args, 'new_hash_init (with init) ( 7)'; 161 | ok($args_in_init[$_], $args[$_], 162 | sprintf('new_hash_init (with init) (%2d)', $_+8)) 163 | for 0..$#args; 164 | 165 | $foo_called = 0; 166 | $bar_called = 0; 167 | @args_in_init = (); 168 | } 169 | 170 | # ---------------------------------------------------------------------------- 171 | 172 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/redefine-warnings.t: -------------------------------------------------------------------------------- 1 | # (X)Emacs mode: -*- cperl -*- 2 | 3 | use strict; 4 | 5 | =head1 Unit Test Package for Class::MethodMaker 6 | 7 | This package tests the basic utility of Class::MethodMaker 8 | 9 | =cut 10 | 11 | use FindBin 1.42 qw( $Bin ); 12 | use Test 1.13 qw( ok plan skip ); 13 | 14 | use lib $Bin; 15 | use test qw( DATA_DIR 16 | evcheck save_output restore_output ); 17 | 18 | BEGIN { 19 | # 1 for compilation test, 20 | plan tests => 2, 21 | todo => [], 22 | } 23 | 24 | # ---------------------------------------------------------------------------- 25 | 26 | =head2 Test 1: compilation 27 | 28 | This test confirms that the test script and the modules it calls compiled 29 | successfully. 30 | 31 | =cut 32 | 33 | ok 1, 1, 'compilation'; 34 | 35 | # ------------------------------------- 36 | 37 | =head2 Test 2: no warnings generated 38 | 39 | This tests for a bug in 2.00 where warnings are generated complaining of 40 | 'prototype mismatch' and 'INTEGER redefined' when using Class::MethodMaker 41 | with certain other modules. Currently IPC::Run is tested, which is 42 | unfortunate, since it is non-core. If someone can suggest a core module that 43 | displays this issue with 2.00, that wouldd be great. 44 | 45 | =cut 46 | 47 | { 48 | save_output('stderr', *STDERR{IO}); 49 | eval { 50 | require IPC::Run; 51 | }; 52 | my $run_failed = $@; 53 | defined $run_failed && $run_failed =~ s/\(.*$// 54 | unless defined $ENV{TEST_DEBUG} and $ENV{TEST_DEBUG} > 1; 55 | eval { 56 | require Class::MethodMaker; 57 | }; 58 | my $err = restore_output('stderr'); 59 | skip $run_failed, $err, '', "No warnings generated\n"; 60 | } 61 | 62 | # ---------------------------------------------------------------------------- 63 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/test_v1.pm: -------------------------------------------------------------------------------- 1 | package test_v1; 2 | 3 | # 4 | # $Id: test_v1.pm,v 1.2 2003/11/24 11:29:34 fluffy Exp $ 5 | # 6 | 7 | # COPYRIGHT NOTICE 8 | # 9 | # Copyright 1996 Organic Online, Inc. Title, ownership rights, and 10 | # intellectual property rights in and to this software remain with 11 | # Organic Online, Inc. Organic Online, Inc. hereby reserves all rights 12 | # in and to this software. This software may not be copied, modified, 13 | # or used without a license from Organic Online, Inc. This software is 14 | # protected by international copyright laws and treaties, and may be 15 | # protected by other law. Violation of copyright laws may result in 16 | # civil liability and criminal penalties. 17 | 18 | use strict; 19 | 20 | use Exporter; 21 | use vars qw ( @ISA @EXPORT ); 22 | @ISA = qw ( Exporter ); 23 | @EXPORT = qw ( TEST COUNT_TESTS PRINT_TEST_HEADER find_test ); 24 | 25 | use FindBin 1.42 qw( $Bin ); 26 | use File::Spec::Functions qw( catdir catfile rel2abs updir ); 27 | use lib $Bin, catdir $Bin, updir, 'lib'; 28 | 29 | my $COUNTER = 0; 30 | 31 | $| = 1; 32 | print "1..", &COUNT_TESTS(), "\n" unless $0 =~ /^-e/; 33 | 34 | sub TEST (&) { 35 | my ($code) = @_; 36 | $COUNTER++; 37 | &$code or print "not "; 38 | print "ok $COUNTER\n"; 39 | } 40 | 41 | sub COUNT_TESTS { 42 | my ($file) = @_; 43 | $file ||= $0; 44 | my $c = 0; 45 | open(IN, $file) or die "Can't open $file: $!"; 46 | while () { 47 | /^\s*#/ and next; 48 | $c += s/(TEST\s{)/$1/g; 49 | } 50 | $c; 51 | } 52 | 53 | sub find_test ($@) { 54 | my ($file, @numbers) = @_; 55 | open(T, $file) or die "Can't open $file: $!"; 56 | local $/ = undef; 57 | my $content = ; 58 | my $c = 0; 59 | my %tests = map { ++$c, $_ } $content =~ /\nTEST\s+{.*?};/gs; 60 | @numbers or @numbers = (1 .. $c); 61 | foreach (@numbers) { 62 | print "#$_: $tests{$_}\n"; 63 | } 64 | } 65 | 66 | 1; 67 | 68 | __END__ 69 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_abstract.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | 8 | use Class::MethodMaker 9 | abstract => [ qw / a b / ], 10 | abstract => 'c'; 11 | 12 | sub new { bless {}, shift; } 13 | 14 | package Y; 15 | use vars '@ISA'; 16 | @ISA = qw ( X ); 17 | 18 | package main; 19 | 20 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 21 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 22 | 23 | my $o = new Y; 24 | 25 | TEST { 1 }; 26 | TEST { 27 | eval { $o->a } ; 28 | $@ =~ /\QCan't locate abstract method "a" declared in "X" via "Y"./ 29 | or 30 | $@ =~ /\QCan't locate abstract method "a" declared in "X", called from "Y"./ 31 | or 32 | $@ =~ /\QCannot invoke abstract method 'X::a', called from 'Y'./; 33 | }; 34 | 35 | exit 0; 36 | 37 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_boolean.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | use Class::MethodMaker 6 | boolean => [ qw / a b c d / ], 7 | boolean => 'e'; 8 | 9 | sub new { bless {}, shift; } 10 | 11 | package Y; 12 | 13 | use base 'X'; 14 | 15 | use Class::MethodMaker 16 | boolean => [ qw / m n / ]; 17 | 18 | sub new { bless {}, shift; } 19 | 20 | package main; 21 | use lib qw ( ./t ); 22 | use test_v1; 23 | 24 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 25 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 26 | 27 | my $o = new X; 28 | 29 | TEST { 1 }; 30 | 31 | TEST { ! $o->a }; 32 | TEST { ! $o->b }; 33 | TEST { ! $o->c }; 34 | TEST { ! $o->d }; 35 | TEST { ! $o->e }; 36 | 37 | TEST { $o->a(1); }; 38 | TEST { $o->a }; 39 | 40 | TEST { $o->set_a }; 41 | TEST { $o->a }; 42 | 43 | TEST { ! $o->a(0); }; 44 | TEST { ! $o->a }; 45 | 46 | TEST { ! $o->clear_a; }; 47 | TEST { ! $o->a }; 48 | 49 | my @f; 50 | TEST { @f = $o->bit_fields }; 51 | TEST { 52 | $f[0] eq 'a' and 53 | $f[1] eq 'b' and 54 | $f[2] eq 'c' and 55 | $f[3] eq 'd' and 56 | $f[4] eq 'e' 57 | }; 58 | 59 | TEST { 60 | $o->clear_a; $o->clear_b; $o->set_c; 61 | $o->set_d; $o->clear_e; 62 | my %f = $o->bit_dump; 63 | $f{'a'} == 0 and $f{'a'} == $o->a and 64 | $f{'b'} == 0 and $f{'b'} == $o->b and 65 | $f{'c'} == 1 and $f{'c'} == $o->c and 66 | $f{'d'} == 1 and $f{'d'} == $o->d and 67 | $f{'e'} == 0 and $f{'e'} == $o->e 68 | }; 69 | 70 | my $y = new Y; 71 | $y->set_a; 72 | $y->clear_m; 73 | 74 | TEST { 75 | $y->a; 76 | }; 77 | 78 | TEST { 79 | ! $y->m; 80 | }; 81 | 82 | exit 0; 83 | 84 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_code.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | code => [ qw / a b / ], 9 | code => 'c'; 10 | sub new { bless {}, shift; } 11 | 12 | package main; 13 | 14 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 15 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 16 | 17 | sub foo { "foo" }; 18 | sub bar { $_[0] }; 19 | sub baz { $_[2]++; $_[0] + $_[1] }; 20 | my $baz_called = 0; 21 | my $baz1 = sub { $_[2]++; $_[0] + $_[1] }; 22 | my $baz2 = bless sub { $baz_called++; }, 'baz'; 23 | my $o = new X; 24 | 25 | TEST { 1 }; 26 | #TEST { eval { $o->a }; !$@ }; # Ooops! this is broken at the moment. 27 | TEST { $o->a(\&foo) }; 28 | TEST { $o->a eq 'foo' }; 29 | TEST { $o->b(\&bar) }; 30 | TEST { $o->b('xxx') eq 'xxx' }; 31 | TEST { $o->c(sub { "baz" } ) }; 32 | TEST { $o->c eq 'baz' }; 33 | # Not stored because it's blessed 34 | TEST { $o->c($baz2) }; 35 | TEST { $o->c eq 'baz' }; 36 | TEST { $baz_called == 0 }; 37 | TEST { $o->c($baz1) }; 38 | my ($a, $b, $c, $d) = (4, 5, 6); 39 | TEST { $d = $o->c($a, $b, $c) }; 40 | TEST { $d == 9 }; 41 | # is copied by value, not aliased 42 | TEST { $c == 6 }; 43 | 44 | exit 0; 45 | 46 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_copy.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | get_set => [qw/ a b /], 9 | copy => 'copy', 10 | deep_copy => 'deeply'; 11 | 12 | sub new { bless {}, shift; } 13 | 14 | package main; 15 | 16 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 17 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 18 | 19 | my $o = new X; 20 | 21 | # 1--8 22 | 23 | TEST { 1 }; 24 | TEST { $o->a ('foo') eq 'foo' }; 25 | TEST { $c = $o->copy; }; 26 | TEST { $c->a eq 'foo' }; 27 | TEST { $c->a ('bar') eq 'bar' }; 28 | TEST { $o->a eq 'foo' }; 29 | TEST { $o->a ('baz') eq 'baz' }; 30 | TEST { $c->a eq 'bar' }; 31 | 32 | # 9--: deep copying 33 | 34 | my $o2 = new X; 35 | my $o3; 36 | 37 | TEST { $o2->a($o) }; 38 | TEST { $o2->a == $o }; 39 | TEST { $o2->a->a eq 'baz' }; 40 | TEST { $o3 = $o2->deeply; }; 41 | TEST { $o3->a->a eq 'baz' }; 42 | TEST { $o->a('bar') }; 43 | TEST { $o->a eq 'bar' }; 44 | TEST { $o2->a->a eq 'bar' }; 45 | TEST { $o3->a->a eq 'baz' }; 46 | 47 | 48 | exit 0; 49 | 50 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_counter.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | 6 | use Class::MethodMaker 7 | counter => [ qw / a b / ], 8 | abstract => 'c'; 9 | 10 | sub new { bless {}, shift; } 11 | 12 | package main; 13 | use lib qw ( ./t ); 14 | use test_v1; 15 | 16 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 17 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 18 | 19 | my $o = new X; 20 | 21 | TEST { 1 }; 22 | TEST { $o->a == 0 }; 23 | TEST { $o->a == 0 }; 24 | TEST { $o->a_incr == 1 }; 25 | TEST { $o->a_incr == 2 }; 26 | TEST { $o->a == 2 }; 27 | TEST { eval { $o->a_reset }; ! length $@ }; 28 | TEST { $o->a == 0 }; 29 | TEST { $o->a_incr(2) == 2 }; 30 | TEST { $o->a_incr(3) == 5 }; 31 | TEST { $o->a_incr == 6 }; 32 | 33 | exit 0; 34 | 35 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_get_concat.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | use Class::MethodMaker 6 | get_concat => 'x', 7 | get_concat => {'name' => 'y', 'join' => "\t"}, 8 | ; 9 | 10 | sub new { bless {}, shift; } 11 | 12 | package main; 13 | use lib qw ( ./t ); 14 | use test_v1; 15 | 16 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 17 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 18 | 19 | my $o = new X; 20 | 21 | TEST { 1 }; 22 | TEST { ! defined $o->x }; 23 | TEST { $o->x('foo') }; 24 | TEST { $o->x eq 'foo' }; 25 | TEST { $o->x('bar') }; 26 | TEST { $o->x eq 'foobar' }; 27 | TEST { ! defined $o->clear_x }; 28 | TEST { ! defined $o->x }; 29 | 30 | TEST { ! defined $o->y }; 31 | TEST { $o->y ('one') }; 32 | TEST { $o->y eq 'one' }; 33 | TEST { $o->y ('two') }; 34 | TEST { $o->y eq "one\ttwo" }; 35 | 36 | exit 0; 37 | 38 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_get_set.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | get_set => [qw/ a b /], 9 | get_set => 'c', 10 | get_set => [ 11 | [ undef, undef, 'get_*', 'set_*' ] => qw/ d e /, 12 | -noclear => 'f', 13 | -eiffel => 'g', 14 | -java => 'H', 15 | -compatibility => 'i', 16 | ]; 17 | 18 | sub new { bless {}, shift; } 19 | 20 | package main; 21 | 22 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 23 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 24 | 25 | my $o = new X; 26 | 27 | TEST { 1 }; 28 | TEST { ! defined $o->a }; 29 | TEST { $o->a(123) }; 30 | TEST { $o->a == 123 }; 31 | TEST { ! defined $o->clear_a }; 32 | TEST { ! defined $o->a }; 33 | TEST { $o->a(456) }; 34 | TEST { $o->a == 456 }; 35 | TEST { ! defined $o->a (undef) }; 36 | TEST { ! defined $o->a }; 37 | TEST { defined *X::clear_a{CODE} }; 38 | 39 | TEST { ! $o->can ('d') }; 40 | TEST { ! $o->can ('clear_e') }; 41 | TEST { ! defined $o->get_d }; 42 | TEST { ! defined $o->set_d ('foo') }; 43 | TEST { $o->get_d eq 'foo' }; 44 | TEST { ! defined $o->set_d (undef) }; 45 | TEST { ! defined $o->get_d }; 46 | 47 | TEST { $o->can ('f') and ! $o->can ('clear_f') and 48 | ! $o->can ('set_f') and ! $o->can ('get_f') }; 49 | TEST { $o->can ('g') and ! $o->can ('clear_g') and 50 | $o->can ('set_g') and ! $o->can ('get_g') }; 51 | TEST { ! $o->can ('h') and ! $o->can ('clear_h') and 52 | $o->can ('setH') and $o->can ('getH') }; 53 | TEST { $o->can ('i') and $o->can ('clear_i') and 54 | ! $o->can ('set_i') and ! $o->can ('get_i') }; 55 | 56 | exit 0; 57 | 58 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_get_set_hi.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | # Tests for interaction of get_set with new_hash_init 6 | 7 | package Person; 8 | 9 | use Class::MethodMaker 10 | new_hash_init => 'new' , 11 | get_set => [ -java => 'Status', 12 | -eiffel => 'size', 'name', ] 13 | ; 14 | 15 | package main; 16 | 17 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 18 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 19 | 20 | my $p = Person->new(name =>'Homer', 21 | size =>'54', 22 | Status =>'Comical Moron'); 23 | 24 | TEST { 1 }; 25 | TEST { $p->name eq 'Homer' }; 26 | TEST { $p->size == 54 }; 27 | TEST { $p->getStatus eq 'Comical Moron' }; 28 | 29 | exit 0; 30 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_hash.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | hash => [ qw / a b / ], 9 | hash => 'c', 10 | new_hash_init => 'new'; 11 | 12 | 13 | package main; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | my $o = new X; 19 | 20 | # 1--7 21 | TEST { 1 }; 22 | TEST { ! scalar keys %{$o->a} }; 23 | TEST { ! defined $o->a('foo') }; 24 | TEST { $o->a('foo', 'baz') }; 25 | TEST { $o->a('foo') eq 'baz' }; 26 | TEST { $o->a('bar', 'baz2') }; 27 | TEST { 28 | my @l = $o->a([qw / foo bar / ]); 29 | $l[0] eq 'baz' and $l[1] eq 'baz2' 30 | }; 31 | 32 | # 8--9 33 | TEST { $o->a(qw / a b c d / ) }; 34 | TEST { 35 | my @l = sort keys %{$o->a}; 36 | $l[0] eq 'a' and 37 | $l[1] eq 'bar' and 38 | $l[2] eq 'c' and 39 | $l[3] eq 'foo' 40 | }; 41 | 42 | # 10 43 | TEST { 44 | my %h=('w' => 'x', 'y' => 'z'); 45 | $o->a(\%h); 46 | }; 47 | 48 | # 11 49 | TEST { 50 | my @l = sort $o->a_keys; 51 | $l[0] eq 'a' and 52 | $l[1] eq 'bar' and 53 | $l[2] eq 'c' and 54 | $l[3] eq 'foo'and 55 | $l[4] eq 'w' and 56 | $l[5] eq 'y' 57 | }; 58 | 59 | #12 60 | TEST { 61 | my @l = sort $o->a_values; 62 | $l[0] eq 'b' and 63 | $l[1] eq 'baz' and 64 | $l[2] eq 'baz2' and 65 | $l[3] eq 'd'and 66 | $l[4] eq 'x' and 67 | $l[5] eq 'z' 68 | }; 69 | 70 | # 13--14 71 | TEST { $o->b_tally(qw / a b c a b a d / ); }; 72 | TEST { 73 | my %h = $o->b; 74 | $h{'a'} == 3 and 75 | $h{'b'} == 2 and 76 | $h{'c'} == 1 and 77 | $h{'d'} == 1 78 | }; 79 | 80 | # 15--19 81 | TEST { $o->c('foo', 'bar') }; 82 | TEST { $o->c('foo') eq 'bar' }; 83 | TEST { 1 }; 84 | TEST { $o->c_delete('foo'); ! defined $o->c('foo') }; 85 | TEST { $o->c }; 86 | 87 | #20 88 | TEST { 89 | $o->c(qw / a b c d e f /); 90 | my %h = $o->c; 91 | $h{'a'} eq 'b' and 92 | $h{'c'} eq 'd' and 93 | $h{'e'} eq 'f' 94 | }; 95 | 96 | #21 97 | TEST { 98 | $o->c_delete(qw / a c /); 99 | my %h = $o->c; 100 | $h{'e'} eq 'f' 101 | }; 102 | 103 | #22 104 | TEST { 105 | my @l = sort keys %{$o->a}; 106 | $l[0] eq 'a' and 107 | $l[1] eq 'bar' and 108 | $l[2] eq 'c' and 109 | $l[3] eq 'foo' and 110 | $l[4] eq 'w' and 111 | $l[5] eq 'y' 112 | }; 113 | 114 | #23 115 | TEST { 116 | $o->a_clear; 117 | my @a_keys = $o->a_keys; 118 | @a_keys == 0; 119 | }; 120 | 121 | #24 122 | $o->a ('a' => 1); 123 | my @l = keys %{$o->a}; 124 | TEST { 125 | $l[0] eq 'a'; 126 | }; 127 | 128 | #25 129 | TEST { 130 | @l == 1; 131 | }; 132 | 133 | #26 134 | TEST { 135 | my $x = $o->a; 136 | my $y = $o->a; 137 | $x == $y; 138 | }; 139 | 140 | #27 141 | TEST { 142 | my $x = X->new(a => +{a => 1, b => 2}); 143 | }; 144 | 145 | exit 0; 146 | 147 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_key_attrib.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | use Class::MethodMaker 6 | key_attrib => [ qw / a b / ], 7 | key_attrib => 'c'; 8 | 9 | sub new { bless {}, shift; } 10 | 11 | package main; 12 | use lib qw ( ./t ); 13 | use test_v1; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | my $o = new X; 19 | my $o2 = new X; 20 | 21 | TEST { 1 }; 22 | 23 | TEST { $o->a(123) }; 24 | TEST { $o->a == 123 }; 25 | TEST { X->find_a(123) eq $o }; 26 | TEST { 27 | $o2->a(456); 28 | my @f = X->find_a(123, 456); 29 | $f[0] eq $o or return 0; 30 | $f[1] eq $o2 or return 0; 31 | }; 32 | 33 | TEST { $o->a('foo') }; 34 | TEST { ! defined X->find_a(123) }; 35 | TEST { X->find_a('foo') eq $o }; 36 | TEST { $o->a(456) }; 37 | TEST { X->find_a(456) eq $o }; 38 | 39 | my $h; 40 | $o2->a(789); 41 | TEST { $h = X->find_a }; 42 | TEST { ref $h eq 'HASH' }; 43 | TEST { scalar keys %$h == 2 }; 44 | TEST { $h->{456} eq $o }; 45 | TEST { $h->{789} eq $o2 }; 46 | 47 | TEST { ! $o2->clear_a }; 48 | TEST { ! defined X->find_a(789) }; 49 | 50 | exit 0; 51 | 52 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_key_with_create.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | use Class::MethodMaker 6 | key_with_create => [ qw / a b / ], 7 | key_with_create => 'c'; 8 | 9 | sub new { bless {}, shift; } 10 | 11 | package main; 12 | use lib qw ( ./t ); 13 | use test_v1; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | my $o = new X; 19 | my $o2 = new X; 20 | 21 | TEST { 1 }; 22 | 23 | TEST { $o->a(123) }; 24 | TEST { $o->a == 123 }; 25 | TEST { X->find_a(123) eq $o }; 26 | TEST { 27 | $o2->a(456); 28 | my @f = X->find_a(123, 456); 29 | $f[0] eq $o or return 0; 30 | $f[1] eq $o2 or return 0; 31 | }; 32 | 33 | TEST { $o->a('foo') }; 34 | TEST { X->find_a(123) ne $o }; 35 | TEST { X->find_a('foo') eq $o }; 36 | TEST { $o->a(456) }; 37 | TEST { X->find_a(456) eq $o }; 38 | 39 | my $h; 40 | $o2->a(789); 41 | TEST { $h = X->find_a }; 42 | TEST { ref $h eq 'HASH' }; 43 | TEST { scalar keys %$h == 3 }; 44 | TEST { $h->{456} eq $o }; 45 | TEST { $h->{789} eq $o2 }; 46 | 47 | TEST { ! $o2->clear_a }; 48 | 49 | my $o3; 50 | TEST { $o3 = X->find_a('baz') }; 51 | TEST { ref $o3 eq 'X' }; 52 | 53 | exit 0; 54 | 55 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_list.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | list => [ qw / a b / ], 9 | list => 'c'; 10 | 11 | sub new { bless {}, shift; } 12 | 13 | package main; 14 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 15 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 16 | 17 | my $o = new X; 18 | 19 | # 1--6 20 | TEST { 1 }; 21 | TEST { ! scalar @{$o->a} }; 22 | TEST { $o->a(123, 456) }; 23 | TEST { $o->unshift_a('baz') }; 24 | TEST { $o->pop_a == 456 }; 25 | TEST { $o->shift_a eq 'baz' }; 26 | 27 | #7--8 28 | TEST { $o->b_push(123, 'foo', [ qw / a b c / ], 'bar') }; 29 | TEST { 30 | my @l = $o->b; 31 | $l[0] == 123 and 32 | $l[1] eq 'foo' and 33 | $l[2]->[0] eq 'a' and 34 | $l[2]->[1] eq 'b' and 35 | $l[2]->[2] eq 'c' and 36 | $l[3] eq 'bar' 37 | }; 38 | 39 | # 9 40 | TEST { 41 | $o->splice_b(1, 2, 'baz'); 42 | my @l = $o->b; 43 | $l[0] == 123 and 44 | $l[1] eq 'baz' and 45 | $l[2] eq 'bar' 46 | }; 47 | 48 | # 10--12 49 | TEST { ref $o->b_ref eq 'ARRAY' }; 50 | TEST { $o->clear_b; 1 }; 51 | TEST { ! scalar @{$o->b} }; 52 | 53 | $o->b_unshift (qw/ a b c /); 54 | my @x = $o->b_index (2, 1, 1, 2); 55 | # 13--15 56 | TEST { @x == 4 }; 57 | TEST { $x[0] eq 'c' and $x[3] eq 'c' }; 58 | TEST { $x[1] eq 'b' and $x[2] eq 'b' }; 59 | 60 | $o->b_set ( 1 => 'd' ); 61 | @x = $o->b; 62 | # 16--19 63 | TEST { @x == 3 }; 64 | TEST { $x[0] eq 'a' }; 65 | TEST { $x[1] eq 'd' }; 66 | TEST { $x[2] eq 'c' }; 67 | 68 | eval { 69 | $o->b_set ( 0 => 'e', 1 ); 70 | }; 71 | # 20 72 | TEST { $@ }; 73 | 74 | TEST { $o->a([123, 456], 789, [321]) }; 75 | TEST { @x = $o->a }; 76 | TEST { @x == 4 }; 77 | TEST { $x[1] == 456 }; 78 | 79 | 80 | exit 0; 81 | 82 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_method.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | method => [ qw / a b / ], 9 | method => 'c'; 10 | sub new { bless {}, shift; } 11 | 12 | package main; 13 | 14 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 15 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 16 | 17 | sub foo { "foo" }; 18 | sub bar { $_[0] }; 19 | my $o = new X; 20 | 21 | TEST { 1 }; 22 | #TEST { eval { $o->a }; !$@ }; # Ooops! this is broken at the moment. 23 | TEST { $o->a(\&foo) }; 24 | TEST { $o->a eq 'foo' }; 25 | TEST { $o->b(\&bar) }; 26 | TEST { $o->b('xxx') eq $o }; 27 | TEST { $o->c(sub { "baz" } ) }; 28 | TEST { $o->c eq 'baz' }; 29 | 30 | exit 0; 31 | 32 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_new.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use ExtUtils::testlib; 8 | 9 | use Class::MethodMaker 10 | new => 'new', 11 | new_with_args => 'new_with_args', 12 | new_with_init => 'new_with_init', 13 | new_hash_init => 'new_hash_init', 14 | get_set => 'toto' 15 | ; 16 | 17 | my $init_called; 18 | my @args_in_init; 19 | my $foo_called; 20 | my $bar_called; 21 | 22 | sub init { 23 | my ($self, @args) = @_; 24 | $init_called++; 25 | @args_in_init = @args; 26 | } 27 | 28 | sub foo { 29 | my ($self, $new) = @_; 30 | defined $new and $self->{'foo'} = $new; 31 | $foo_called = 1; 32 | $self->{'foo'}; 33 | } 34 | 35 | sub bar { 36 | my ($self, $new) = @_; 37 | defined $new and $self->{'bar'} = $new; 38 | $bar_called = 1; 39 | $self->{'bar'}; 40 | } 41 | 42 | package main; 43 | 44 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 45 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 46 | 47 | TEST { 1 }; 48 | 49 | # Regular new 50 | TEST { $o = new X; }; 51 | TEST { ref $o eq 'X'; }; 52 | 53 | # new_with_init 54 | my @args = (1, 2, 3); 55 | TEST { $o = X->new_with_init(@args) }; 56 | TEST { ref $o eq 'X'; }; 57 | TEST { $#args_in_init == $#args }; 58 | TEST { 59 | for (0..$#args) { $args_in_init[$_] == $args[$_] or return 0; } 60 | return 1; 61 | }; 62 | 63 | # new_hash_init 64 | TEST { $o = X->new_hash_init( 'foo' => 123, 'bar' => 456 ) }; 65 | TEST { ref $o eq 'X'; }; 66 | TEST { $foo_called }; 67 | TEST { $bar_called }; 68 | TEST { $o->foo == 123 }; 69 | TEST { $o->bar == 456 }; 70 | 71 | # new_hash_init (taking hashref) 72 | TEST { $o = X->new_hash_init({ 'foo' => 123, 'bar' => 456 }) }; 73 | TEST { ref $o eq 'X'; }; 74 | TEST { $foo_called }; 75 | TEST { $bar_called }; 76 | TEST { $o->foo == 123 }; 77 | TEST { $o->bar == 456 }; 78 | 79 | # new_with_args 80 | TEST { $o = X->new_with_args(toto => '3');}; 81 | TEST { $o->toto eq '3'}; 82 | 83 | exit 0; 84 | 85 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_new_hash_with_init.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package XXX; 6 | 7 | use Class::MethodMaker 8 | new_hash_with_init => 'new', 9 | get_set => [ qw/foo bar baz/ ]; 10 | 11 | sub init { 12 | my $self = shift; 13 | $self->bar(666); 14 | $self->baz(42); 15 | } 16 | 17 | package main; 18 | 19 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 20 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 21 | 22 | # test the classes themselves 23 | 24 | my $obj = XXX->new(foo => 7, bar => 13); 25 | # 1--4 26 | TEST { $obj->isa('XXX'); }; 27 | TEST { $obj->foo == 7; }; 28 | TEST { $obj->bar == 666; }; 29 | TEST { $obj->baz == 42; }; 30 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_object.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package Y; 6 | sub new { bless { foo => 'foo', bar => 'bar', arg => $_[1] }, $_[0]; } 7 | sub foo { shift->{'foo'}; } 8 | sub bar { 9 | my ($self, $new) = @_; 10 | defined $new and $self->{'bar'} = $new; 11 | $self->{'bar'}; 12 | } 13 | 14 | package Z; 15 | 16 | use Class::MethodMaker 17 | new_hash_init => 'new', 18 | object => [ 'Y' => 'a' ]; 19 | 20 | package X; 21 | 22 | use Class::MethodMaker 23 | object => [ 24 | 'Y' => 'a', 25 | 'Y' => [ qw / b c d / ], 26 | 'Y' => [ 27 | { 28 | slot => 'e', 29 | comp_mthds => [ qw / foo / ], 30 | }, 31 | { 32 | slot => 'f', 33 | comp_mthds => [ qw / bar / ], 34 | } 35 | ], 36 | 'Z' => 'z', 37 | ]; 38 | 39 | sub new { bless {}, shift; } 40 | 41 | package main; 42 | 43 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 44 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 45 | 46 | my $o = new X; 47 | 48 | TEST { 1 }; 49 | 50 | TEST { ref $o->a eq 'Y' }; 51 | TEST { ref $o->b eq 'Y' }; 52 | 53 | my $y = new Y; 54 | TEST { $o->c($y); }; 55 | TEST { $o->c eq $y }; 56 | TEST { ref $o->c eq 'Y' }; 57 | 58 | TEST { ref $o->e eq 'Y' }; 59 | 60 | TEST { $o->foo eq 'foo' }; 61 | TEST { $o->bar('bar') }; 62 | TEST { $o->bar eq 'bar' }; 63 | 64 | TEST { $o->e->foo eq $o->foo }; 65 | 66 | TEST { $o->d('barney') }; 67 | my $d; 68 | TEST { $d = $o->d }; 69 | TEST { ref $d eq 'Y' }; 70 | 71 | TEST { $d->{arg} eq 'barney' }; 72 | 73 | my $z; 74 | TEST { $z = Z->new }; 75 | TEST { $z->a }; 76 | TEST { $o->z }; 77 | 78 | exit 0; 79 | 80 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_object_list.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package Y; 6 | my $count = 0; 7 | sub new { bless { id => $count++ }, shift; } 8 | sub id { shift->{id}; } 9 | 10 | package X; 11 | 12 | use Class::MethodMaker 13 | object_list => [ 14 | 'Y' => { slot => 'a', comp_mthds => 'id' }, 15 | ]; 16 | 17 | sub new { bless {}, shift; } 18 | my $o = new X; 19 | 20 | package main; 21 | 22 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 23 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 24 | 25 | # 1 26 | TEST { 1 }; 27 | 28 | # 2-3 29 | TEST { $o->a_push (Y->new) }; 30 | TEST { $o->a_push (Y->new) }; 31 | # 4-6 32 | TEST { $o->a_pop->id == 1 }; 33 | TEST { $o->a_push (Y->new) }; 34 | TEST { @b = $o->a; @b == 2 }; 35 | # 7-9 36 | TEST { join (' ', $o->id) eq '0 2' }; 37 | TEST { $a = 1; for ($o->a) { $a &&= ( ref ($_) eq 'Y' ) }; $a }; 38 | TEST { $o->a_shift->id == 0 }; 39 | # 10-12 40 | TEST { $o->a_unshift ( Y->new ) }; 41 | TEST { @b = $o->a; @b == 2 }; 42 | TEST { $a = 1; for ($o->a) { $a &&= ( ref ($_) eq 'Y' ) }; $a }; 43 | # 13-15 44 | TEST { join (' ', $o->id) eq '3 2' }; 45 | TEST { ref($o->a_index(0)) eq 'Y' }; 46 | TEST { $o->a_set(0 => Y->new); 1 }; 47 | # 16-17 48 | TEST { $o->a_index(0)->id == 4}; 49 | TEST { @b = $o->a; @b == 2 }; 50 | 51 | # 18 52 | TEST { $o->a_clear; $o->a_count == 0 }; 53 | 54 | # Backwards compatibility test 55 | # 19-21 56 | TEST { $o->push_a (Y->new) }; 57 | TEST { $o->push_a (Y->new) }; 58 | TEST { $o->pop_a->id == 6 }; 59 | # 22-24 60 | TEST { $o->push_a (Y->new) }; 61 | TEST { @b = $o->a; @b == 2 }; 62 | TEST { join (' ', $o->id) eq '5 7' }; 63 | # 25-27 64 | TEST { $a = 1; for ($o->a) { $a &&= ( ref ($_) eq 'Y' ) }; $a }; 65 | TEST { $o->shift_a->id == 5 }; 66 | TEST { $o->unshift_a ( Y->new ) }; 67 | # 28-30 68 | TEST { @b = $o->a; @b == 2 }; 69 | TEST { $a = 1; for ($o->a) { $a &&= ( ref ($_) eq 'Y' ) }; $a }; 70 | TEST { join (' ', $o->id) eq '8 7' }; 71 | # 31-33 72 | TEST { ref($o->index_a(0)) eq 'Y' }; 73 | TEST { $o->set_a(0 => Y->new); 1 }; 74 | TEST { $o->a_index(0)->id == 9}; 75 | # 34 76 | TEST { @b = $o->a; @b == 2 }; 77 | 78 | exit 0; 79 | 80 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_object_tie_hash.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package myHash; 4 | use Tie::Hash ; 5 | 6 | @ISA=qw/Tie::StdHash/ ; 7 | 8 | use vars qw/$log/ ; 9 | 10 | $log = 'log: '; 11 | 12 | sub TIEHASH { 13 | my $class = shift; 14 | my $p = shift || ''; 15 | #print "log $p ($log))\n"; 16 | $log .= "tie $p,"; 17 | return bless {}, $class ; 18 | } 19 | 20 | sub STORE { my ($self, $idx, $value) = @_ ; 21 | #print "storing $idx, $value ...\n"; 22 | $log .= "store $idx,"; 23 | $self->{$idx}=$value; 24 | return $value;} 25 | 26 | package myObj ; 27 | use ExtUtils::testlib; 28 | 29 | use Class::MethodMaker 30 | get_set => [qw/a b c/] ; 31 | 32 | sub new 33 | { 34 | my $class = shift; 35 | bless { @_ }, $class; 36 | } 37 | 38 | sub all { my $self = shift; return join (' ', values %{$self}) ;} 39 | 40 | package X ; 41 | use ExtUtils::testlib; 42 | 43 | use Class::MethodMaker 44 | object_tie_hash => 45 | [ 46 | { 47 | slot => 'a', 48 | tie_hash => ['myHash', "log a"], 49 | class => ['myObj', 'a' => 'foo'] 50 | }, 51 | { 52 | slot =>['b','c'], 53 | tie_hash => ['myHash', "log bc"], 54 | class => ['myObj', 'b' => 'bar'] 55 | } 56 | ], 57 | new => 'new'; 58 | 59 | package main; 60 | use lib qw ( ./t ); 61 | use test_v1; 62 | 63 | use ExtUtils::testlib; 64 | 65 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 66 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 67 | 68 | use Data::Dumper ; 69 | my $o = new X; 70 | 71 | TEST { 1 }; 72 | # create a hash of 2 object with default constructor arguments 73 | TEST {$o->a(foo=> [], bar => [])} ; 74 | 75 | #print Dumper $o ; 76 | TEST {$o->a->{foo}->a eq 'foo'} ; 77 | TEST {$o->a->{bar}->a eq 'foo'} ; 78 | 79 | TEST {$o->a(foo2=> [a=> 'toto'])} ; 80 | 81 | #print Dumper $o ; 82 | TEST {$o->a->{foo2}->a eq 'toto'} ; 83 | 84 | TEST {$o->b(foo2=> [a=> 'toto'])} ; 85 | #print Dumper $o ; 86 | TEST {$o->b->{foo2}->a eq 'toto'} ; 87 | 88 | 89 | exit 0 ; 90 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_object_tie_list.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package myArray; 4 | use Tie::Array ; 5 | 6 | @ISA=qw/Tie::StdArray/ ; 7 | 8 | use vars qw/$log/ ; 9 | 10 | $log = 'log: '; 11 | 12 | sub TIEARRAY { 13 | my $class = shift; 14 | my $p = shift || ''; 15 | #print "log $p ($log))\n"; 16 | $log .= "tie $p,"; 17 | return bless [], $class ; 18 | } 19 | 20 | sub STORE { my ($self, $idx, $value) = @_ ; 21 | #print "storing $idx, $value ...\n"; 22 | $log .= "store $idx,"; 23 | $self->[$idx]=$value; 24 | return $value;} 25 | 26 | package myObj ; 27 | use ExtUtils::testlib; 28 | 29 | use Class::MethodMaker 30 | get_set => [qw/a b c/] ; 31 | 32 | sub new 33 | { 34 | my $class = shift; 35 | 36 | bless { arg=> shift }, $class; 37 | } 38 | 39 | sub all { my $self = shift; return join (' ', values %{$self}) ;} 40 | 41 | package X ; 42 | use ExtUtils::testlib; 43 | 44 | use Class::MethodMaker 45 | object_tie_list => 46 | [ 47 | { 48 | slot => 'a', 49 | tie_array => ['myArray', "a"], 50 | class => ['myObj', 'a_obj'] 51 | }, 52 | { 53 | slot =>['b','c'], 54 | tie_array => ['myArray', "bc"], 55 | class => ['myObj', 'b_obj'] 56 | } 57 | ], 58 | new => 'new'; 59 | 60 | package main; 61 | use lib qw ( ./t ); 62 | use test_v1; 63 | 64 | use ExtUtils::testlib; 65 | 66 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 67 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 68 | 69 | use Data::Dumper ; 70 | my $o = new X; 71 | 72 | TEST { 1 }; 73 | # create a list of 2 object with default constructor arguments 74 | TEST {$o->a(1,2)} ; 75 | 76 | if ( $ENV{TEST_DEBUG} ) { 77 | my @a = $o->a ; 78 | print Dumper \@a; 79 | } 80 | 81 | TEST {$o->a->[0]->all eq 'a_obj' }; 82 | TEST {$o->a->[1]->all eq 'a_obj' }; 83 | 84 | # verifie that tied array is used 85 | TEST {$myArray::log eq 'log: tie a,store 0,store 1,'} ; 86 | 87 | # create 2 object using constructor arguments 88 | TEST {$o->b(['b1_obj'],['b2_obj'])} ; 89 | 90 | if ( $ENV{TEST_DEBUG} ) { 91 | my @b = $o->b ; 92 | print Dumper \@b; 93 | } 94 | 95 | TEST {$o->b->[0]->all eq 'b1_obj' }; 96 | TEST {$o->b->[1]->all eq 'b2_obj' }; 97 | # verifie that tied array is used 98 | TEST {$myArray::log eq 'log: tie a,store 0,store 1,tie bc,store 0,store 1,'}; 99 | 100 | # create 2 object and assign them 101 | my @objs = (myObj->new('c1_obj'), myObj->new('c2_obj')); 102 | TEST {$o->c(@objs)} ; 103 | TEST {$o->c->[0]->all eq 'c1_obj' }; 104 | TEST {$o->c->[1]->all eq 'c2_obj' }; 105 | 106 | exit 0; 107 | 108 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_set_once.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | use strict; 5 | 6 | use Class::MethodMaker 7 | get_set => [qw[ setable_00 ]], 8 | get_set => [qw[ -set_once dier_00 dier_01]], 9 | get_set => [qw[ setable_01 -set_once dier_04]], 10 | get_set => [qw[ -set_once_or_die dier_02 dier_03]], 11 | get_set => [qw[ -set_once_or_warn warner_00 warner_01]], 12 | get_set => [qw[ -set_once_or_carp carper_00 carper_01]], 13 | get_set => [qw[ -set_once_or_cluck clucker_00 clucker_01]], 14 | get_set => [qw[ -set_once_or_croak croaker_00 croaker_01]], 15 | get_set => [qw[ -set_once_or_confess confessor_00 confessor_01]], 16 | get_set => [qw[ -set_once_or_myonce myonce_00 myonce_01]], 17 | get_set => [qw[ -set_once_or_ignore ignore_00]], 18 | ; 19 | 20 | sub new { bless {}, shift; } 21 | sub myonce { die "myonce" }; 22 | 23 | package main; 24 | use lib qw ( ./t ); 25 | use test_v1; 26 | 27 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 28 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 29 | 30 | my $o = new X; 31 | my $p = new X; 32 | 33 | # trigger a get on all values 34 | TEST { 1 }; # (1) 35 | TEST { !defined $o->setable_00 }; # (2) 36 | TEST { !defined $o->setable_01 }; # (3) 37 | TEST { !defined $o->dier_00 }; # (4) 38 | TEST { !defined $o->dier_01 }; # (5) 39 | TEST { !defined $o->dier_02 }; # (6) 40 | TEST { !defined $o->dier_03 }; # (7) 41 | TEST { !defined $o->dier_04 }; # (8) 42 | TEST { !defined $o->warner_00 }; # (9) 43 | TEST { !defined $o->warner_01 }; # (10) 44 | TEST { !defined $o->carper_00 }; # (11) 45 | TEST { !defined $o->carper_01 }; # (12) 46 | TEST { !defined $o->clucker_00 }; # (13) 47 | TEST { !defined $o->clucker_01 }; # (14) 48 | TEST { !defined $o->croaker_00 }; # (15) 49 | TEST { !defined $o->croaker_01 }; # (16) 50 | TEST { !defined $o->confessor_00 }; # (17) 51 | TEST { !defined $o->confessor_01 }; # (18) 52 | TEST { !defined $o->myonce_00 }; # (19) 53 | TEST { !defined $o->myonce_01 }; # (20) 54 | 55 | # trigger a set on all values 56 | TEST { $o->setable_00(1) == 1 }; # (21) 57 | TEST { $o->setable_01(2) == 2 }; # (22) 58 | TEST { $o->dier_00(3) == 3 }; # (23) 59 | TEST { $o->dier_01(4) == 4 }; # (24) 60 | TEST { $o->dier_02(5) == 5 }; # (25) 61 | TEST { $o->dier_03(6) == 6 }; # (26) 62 | TEST { $o->dier_04(7) == 7 }; # (27) 63 | TEST { $o->warner_00(8) == 8 }; # (28) 64 | TEST { $o->warner_01(9) == 9 }; # (29) 65 | TEST { $o->carper_00(10) == 10 }; # (30) 66 | TEST { $o->carper_01(11) == 11 }; # (31) 67 | TEST { $o->clucker_00(12) == 12 }; # (32) 68 | TEST { $o->clucker_01(13) == 13 }; # (33) 69 | TEST { $o->croaker_00(14) == 14 }; # (34) 70 | TEST { $o->croaker_01(15) == 15 }; # (35) 71 | TEST { $o->myonce_00(16) == 16 }; # (36) 72 | TEST { $o->myonce_01(17) == 17 }; # (37) 73 | 74 | # trigger ANOTHER set on all values 75 | my $w; # 1 if a warn() of sorts was called. 76 | $SIG{__WARN__} = sub { $w=1; die(@_) }; 77 | 78 | TEST { eval{$w=0}; eval{$o->setable_00(1) }; $w == 0 && !length($@) }; # (38) 79 | TEST { eval{$w=0}; eval{$o->setable_01(2) }; $w == 0 && !length($@) }; # (39) 80 | TEST { eval{$w=0}; eval{$o->dier_00(3) }; $w == 0 && length($@) }; # (40) 81 | TEST { eval{$w=0}; eval{$o->dier_01(4) }; $w == 0 && length($@) }; # (41) 82 | TEST { eval{$w=0}; eval{$o->dier_02(5) }; $w == 0 && length($@) }; # (42) 83 | TEST { eval{$w=0}; eval{$o->dier_03(6) }; $w == 0 && length($@) }; # (43) 84 | TEST { eval{$w=0}; eval{$o->dier_04(7) }; $w == 0 && length($@) }; # (44) 85 | TEST { eval{$w=0}; eval{$o->warner_00(8) }; $w == 1 && length($@) }; # (45) 86 | TEST { eval{$w=0}; eval{$o->warner_01(9) }; $w == 1 && length($@) }; # (46) 87 | TEST { eval{$w=0}; eval{$o->carper_00(10) }; $w == 1 && length($@) }; # (47) 88 | TEST { eval{$w=0}; eval{$o->carper_01(11) }; $w == 1 && length($@) }; # (48) 89 | TEST { eval{$w=0}; eval{$o->clucker_00(12) }; $w == 1 && length($@) }; # (49) 90 | TEST { eval{$w=0}; eval{$o->clucker_01(13) }; $w == 1 && length($@) }; # (50) 91 | TEST { eval{$w=0}; eval{$o->croaker_00(14) }; $w == 0 && length($@) }; # (51) 92 | TEST { eval{$w=0}; eval{$o->croaker_01(15) }; $w == 0 && length($@) }; # (52) 93 | TEST { eval{$w=0}; eval{$o->confessor_00(14) }; $w == 0 && !length($@) }; # (53) 94 | TEST { eval{$w=0}; eval{$o->confessor_01(15) }; $w == 0 && !length($@) }; # (54) 95 | TEST { eval{$w=0}; eval{$o->myonce_00(16) }; $w == 0 && $@ =~ /^myonce/ }; # (55) 96 | TEST { eval{$w=0}; eval{$o->myonce_01(17) }; $w == 0 && $@ =~ /^myonce/ }; # (56) 97 | 98 | # Prove absence of static effects 99 | 100 | TEST { $o->ignore_00(1) == 1 }; # (57) 101 | TEST { $o->ignore_00(2) == 1 }; # (58) 102 | TEST { ! defined $p->ignore_00 }; # (59) 103 | TEST { $p->ignore_00(2) == 2 }; # (60) 104 | TEST { $p->ignore_00(3) == 2 }; # (61) 105 | 106 | TEST { ! defined $p->carper_01 }; # (62) 107 | TEST { $p->carper_01(2) == 2 }; # (63) 108 | TEST { eval{$w=0}; eval{$p->carper_01(11) }; $w == 1 && length($@) }; # (64) 109 | 110 | TEST { ! defined $p->dier_04 }; # (65) 111 | TEST { $p->dier_04(2) == 2 }; # (66) 112 | TEST { eval{$w=0}; eval{$p->dier_04(7) }; $w == 0 && length($@) }; # (67) 113 | 114 | TEST { ! defined $p->myonce_00 }; # (68) 115 | TEST { $p->myonce_00(7) == 7 }; # (69) 116 | TEST { $p->myonce_00 == 7 }; # (70) 117 | TEST { eval{$w=0}; eval{$p->myonce_00(16) }; $w == 0 && $@ =~ /^myonce/ }; # (71) 118 | 119 | exit 0; 120 | 121 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_set_once_static.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package X; 4 | 5 | use Class::MethodMaker 6 | get_set => [qw[ -set_once -static foo ]], 7 | get_set => [qw[ -static -set_once bar ]], 8 | get_set => [qw[ -static -set_once_or_ignore ignore00 ]], 9 | get_set => [qw[ -static -set_once_or_warn warn00 ]], 10 | get_set => [qw[ -static -set_once_or_carp carp00 ]], 11 | get_set => [qw[ -static -set_once_or_myonce myonce00 ]], 12 | ; 13 | 14 | sub new { bless {}, shift; } 15 | sub myonce { die "myonce" }; 16 | 17 | package main; 18 | use lib qw ( ./t ); 19 | use test_v1; 20 | 21 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 22 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 23 | 24 | my $a = new X; 25 | my $b = new X; 26 | 27 | # 1..6 28 | TEST { 1 }; 29 | TEST { !defined $a->foo() }; 30 | TEST { $b->foo('x') eq 'x' }; 31 | TEST { $a->foo() eq 'x' }; 32 | TEST { eval{1}; eval{$a->foo('y')}; length($@) }; 33 | TEST { eval{1}; eval{$b->foo('y')}; length($@) }; 34 | 35 | # 7..12 36 | TEST { 1 }; 37 | TEST { !defined $a->bar() }; 38 | TEST { $b->bar('x') eq 'x' }; 39 | TEST { $a->bar() eq 'x' }; 40 | TEST { eval{1}; eval{$a->bar('y')}; length($@) }; 41 | TEST { eval{1}; eval{$b->bar('y')}; length($@) }; 42 | 43 | # trigger ANOTHER set on all values 44 | my $w; # 1 if a warn() of sorts was called. 45 | $SIG{__WARN__} = sub { $w=1; die(@_) }; 46 | 47 | # 13..20 48 | TEST { 1 }; 49 | TEST { !defined $a->warn00() }; 50 | TEST { $b->warn00('a') eq 'a' }; 51 | TEST { $a->warn00() eq 'a' }; 52 | TEST { eval{$w=0;1}; eval{$a->warn00('b')}; $w==1 && length($@) }; 53 | TEST { eval{$w=0;1}; eval{$b->warn00('b')}; $w==1 && length($@) }; 54 | TEST { $a->warn00() eq 'a' }; 55 | TEST { $b->warn00() eq 'a' }; 56 | 57 | # 21..28 58 | TEST { 1 }; 59 | TEST { !defined $a->carp00() }; 60 | TEST { $b->carp00('c') eq 'c' }; 61 | TEST { $a->carp00() eq 'c' }; 62 | TEST { eval{$w=0;1}; eval{$a->carp00('d')}; $w==1 && length($@) }; 63 | TEST { eval{$w=0;1}; eval{$b->carp00('d')}; $w==1 && length($@) }; 64 | TEST { $a->carp00() eq 'c' }; 65 | TEST { $b->carp00() eq 'c' }; 66 | 67 | # 29..36 68 | TEST { 1 }; 69 | TEST { !defined $a->myonce00() }; 70 | TEST { $b->myonce00('e') eq 'e' }; 71 | TEST { $a->myonce00() eq 'e' }; 72 | TEST { eval{$w=0;1}; eval{$a->myonce00('f')}; $w==0 && $@=~/^myonce/ }; 73 | TEST { eval{$w=0;1}; eval{$b->myonce00('f')}; $w==0 && $@=~/^myonce/ }; 74 | TEST { $a->myonce00() eq 'e' }; 75 | TEST { $b->myonce00() eq 'e' }; 76 | 77 | # 37..42 78 | TEST { 1 }; 79 | TEST { !defined $a->ignore00() }; 80 | TEST { $b->ignore00('g') eq 'g' }; 81 | TEST { $a->ignore00() eq 'g' }; 82 | TEST { eval{$w=0;1}; eval{$a->ignore00('h')}; $w==0 && !length($@) }; 83 | TEST { eval{$w=0;1}; eval{$b->ignore00('h')}; $w==0 && !length($@) }; 84 | TEST { $a->ignore00() eq 'g' }; 85 | TEST { $b->ignore00() eq 'g' }; 86 | 87 | exit 0; 88 | 89 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_singleton.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | 3 | package XXX; 4 | 5 | use Class::MethodMaker 6 | singleton => 'instance', 7 | get_set => [ qw/foo bar baz/ ]; 8 | 9 | sub init { 10 | my $self = shift; 11 | $self->bar(666); 12 | $self->baz(42); 13 | } 14 | 15 | package main; 16 | use lib qw ( ./t ); 17 | use test_v1; 18 | 19 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 20 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 21 | 22 | # test the classes themselves 23 | 24 | # 1--4 25 | my $obj = XXX->instance(foo => 7, bar => 13); 26 | TEST { $obj->isa('XXX'); }; 27 | TEST { $obj->foo == 7; }; 28 | TEST { $obj->bar == 666; }; 29 | TEST { $obj->baz == 42; }; 30 | 31 | # 5--8 32 | my $obj2 = XXX->instance; 33 | TEST { $obj2->isa('XXX'); }; 34 | TEST { $obj2->foo == 7; }; 35 | TEST { $obj2->bar == 666; }; 36 | TEST { $obj2->baz == 42; }; 37 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_static_get_set.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | get_set => [ qw / -static a b / ], 9 | static_get_set => 'c'; 10 | 11 | sub new { bless {}, shift; } 12 | 13 | package main; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | my $o = new X; 19 | my $o2 = new X; 20 | 21 | # 1--7 22 | TEST { 1 }; 23 | TEST { ! defined $o->a }; 24 | TEST { $o->a(123) }; 25 | TEST { $o->a == 123 }; 26 | TEST { $o2->a == 123 }; 27 | TEST { ! defined $o2->clear_a }; 28 | TEST { ! defined $o->a }; 29 | 30 | # 8--13 31 | TEST { ! defined $o->b }; 32 | TEST { $o->b('hello world') }; 33 | TEST { $o->b eq 'hello world' }; 34 | TEST { $o2->b eq 'hello world' }; 35 | TEST { ! defined $o2->clear_b }; 36 | TEST { ! defined $o->b }; 37 | 38 | my $foo = 'this'; 39 | # 14--15 40 | TEST { ! defined $o->c }; 41 | TEST { $o->c(\$foo) }; 42 | 43 | $foo = 'that'; 44 | 45 | # 16--22 46 | TEST { $o->c eq \$foo }; 47 | TEST { $o2->c eq \$foo }; 48 | TEST { ${$o->c} eq ${$o2->c}}; 49 | TEST { ${$o->c} eq 'that'}; 50 | TEST { ${$o->c} eq 'that'}; 51 | TEST { ! defined $o2->clear_c }; 52 | TEST { ! defined $o->c }; 53 | 54 | exit 0; 55 | 56 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_static_hash.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | static_hash => [ qw / a b / ], 9 | static_hash => 'c'; 10 | 11 | sub new { bless {}, shift; } 12 | 13 | package main; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | my $o = new X; 19 | my $o2 = new X; 20 | 21 | TEST { 1 }; 22 | TEST { ! scalar keys %{$o->a} }; 23 | TEST { ! defined $o->a('foo') }; 24 | TEST { $o->a('foo', 'baz') }; 25 | TEST { $o->a('foo') eq 'baz' }; 26 | TEST { $o->a('bar', 'baz2') }; 27 | TEST { 28 | my @l = $o->a([qw / foo bar / ]); 29 | $l[0] eq 'baz' and $l[1] eq 'baz2' 30 | }; 31 | 32 | TEST { $o->a(qw / a b c d / ) }; 33 | TEST { 34 | my %h = $o->a; 35 | my @l = sort keys %h; 36 | $l[0] eq 'a' and 37 | $l[1] eq 'bar' and 38 | $l[2] eq 'c' and 39 | $l[3] eq 'foo' 40 | }; 41 | 42 | TEST { 43 | my %h=('w' => 'x', 'y' => 'z'); 44 | my $rh = \%h; 45 | my $r = $o->a($rh); 46 | }; 47 | 48 | TEST { 49 | my @l = sort $o->a_keys; 50 | $l[0] eq 'a' and 51 | $l[1] eq 'bar' and 52 | $l[2] eq 'c' and 53 | $l[3] eq 'foo' and 54 | $l[4] eq 'w' and 55 | $l[5] eq 'y' 56 | }; 57 | 58 | TEST { 59 | my @l = sort $o->a_values; 60 | $l[0] eq 'b' and 61 | $l[1] eq 'baz' and 62 | $l[2] eq 'baz2' and 63 | $l[3] eq 'd' and 64 | $l[4] eq 'x' and 65 | $l[5] eq 'z' 66 | }; 67 | 68 | TEST { $o->b_tally(qw / a b c a b a d / ); }; 69 | TEST { 70 | my %h = $o->b; 71 | $h{'a'} == 3 and 72 | $h{'b'} == 2 and 73 | $h{'c'} == 1 and 74 | $h{'d'} == 1 75 | }; 76 | 77 | TEST { ! defined $o->c('foo') }; 78 | TEST { defined $o->c }; 79 | 80 | TEST { 81 | my @a = $o->a; 82 | my @a2 = $o2->a; 83 | (@a == @a2) && 84 | ! grep $a[$_] ne $a2[$_], 0..$#a; 85 | }; 86 | 87 | exit 0; 88 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_static_list.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package X; 6 | 7 | use Class::MethodMaker 8 | static_list => [ qw / a b / ], 9 | static_list => 'c'; 10 | 11 | sub new { bless {}, shift; } 12 | 13 | package main; 14 | 15 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 16 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 17 | 18 | use Data::Dumper; 19 | 20 | my $o = new X; 21 | my $o2 = new X; 22 | 23 | # 1--6 24 | TEST { 1 }; 25 | TEST { ! scalar @{$o->a} }; 26 | TEST { $o->a_push(123, 456) }; 27 | TEST { $o->a_unshift('baz') }; 28 | TEST { $o->a_pop == 456 }; 29 | TEST { $o->a_shift eq 'baz' }; 30 | 31 | #7--8 32 | TEST { $o->b_push(123, 'foo', [ qw / a b c / ], 'bar') }; 33 | TEST { 34 | my @l = $o->b; 35 | print STDERR Data::Dumper->Dump([\@l],['l']) 36 | if exists $ENV{TEST_DEBUG} && $ENV{TEST_DEBUG}; 37 | $l[0] == 123 and 38 | $l[1] eq 'foo' and 39 | $l[2]->[0] eq 'a' and 40 | $l[2]->[1] eq 'b' and 41 | $l[2]->[2] eq 'c' and 42 | $l[3] eq 'bar' 43 | }; 44 | 45 | # 9 46 | TEST { 47 | $o->b_splice(1, 2, 'baz'); 48 | my @l = $o->b; 49 | print STDERR Data::Dumper->Dump([\@l],['l']) 50 | if exists $ENV{TEST_DEBUG} && $ENV{TEST_DEBUG}; 51 | $l[0] == 123 and 52 | $l[1] eq 'baz' and 53 | $l[2] eq 'bar' 54 | }; 55 | 56 | # 10--12 57 | TEST { ref $o->b_ref eq 'ARRAY' }; 58 | TEST { ! scalar $o->b_clear }; 59 | TEST { ! scalar @{$o->b} }; 60 | 61 | $o->b_unshift(qw/ a b c /); 62 | my @x = $o->b_index (2, 1, 1, 2); 63 | # 13--15 64 | TEST { @x == 4 }; 65 | TEST { $x[0] eq 'c' and $x[3] eq 'c' }; 66 | TEST { $x[1] eq 'b' and $x[2] eq 'b' }; 67 | 68 | $o->b_set ( 1 => 'd' ); 69 | @x = $o->b; 70 | # 16--19 71 | TEST { @x == 3 }; 72 | TEST { $x[0] eq 'a' }; 73 | TEST { $x[1] eq 'd' }; 74 | TEST { $x[2] eq 'c' }; 75 | 76 | eval { 77 | $o->b_set ( 0 => 'e', 1 ); 78 | }; 79 | # 20--21 80 | TEST { $@ }; 81 | TEST { ($o->b)[0] eq ($o2->b)[0] }; 82 | 83 | eval { 84 | $o->b ( 'e' ); 85 | }; 86 | # 22--26 87 | TEST { ! $@ }; 88 | TEST { ($o->b)[0] eq 'e' }; 89 | TEST { (my @a = $o->b) == 1 }; 90 | TEST { ($o2->b)[0] eq 'e' }; 91 | TEST { (my @a = $o2->b) == 1 }; 92 | exit 0; 93 | 94 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_tie_hash.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package Y; 6 | 7 | sub new { bless {}, shift; } 8 | sub foo { $_[0]->{foo} = $_[1] if $#_; $_[0]->{foo} } 9 | 10 | package X; 11 | 12 | use Tie::RefHash; 13 | 14 | use Class::MethodMaker 15 | tie_hash => [ 16 | a => { 17 | 'tie' => qw/ Tie::RefHash /, 18 | 'args' => [], 19 | }, 20 | b => { 21 | 'tie' => qw/ Tie::RefHash /, 22 | 'args' => [], 23 | }, 24 | ]; 25 | 26 | sub new { bless {}, shift; } 27 | 28 | package main; 29 | 30 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 31 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 32 | 33 | my $o = new X; 34 | 35 | TEST { 1 }; 36 | TEST { ! scalar keys %{$o->a} }; 37 | TEST { ! defined $o->a('foo') }; 38 | TEST { $o->a('foo', 'baz') }; 39 | TEST { $o->a('foo') eq 'baz' }; 40 | TEST { $o->a('bar', 'baz2') }; 41 | TEST { 42 | my @l = $o->a([qw / foo bar / ]); 43 | $l[0] eq 'baz' and $l[1] eq 'baz2' 44 | }; 45 | 46 | TEST { $o->a(qw / a b c d / ) }; 47 | TEST { 48 | my @l = sort keys %{$o->a}; 49 | $l[0] eq 'a' and 50 | $l[1] eq 'bar' and 51 | $l[2] eq 'c' and 52 | $l[3] eq 'foo' 53 | }; 54 | 55 | TEST { 56 | my @l = sort $o->a_keys; 57 | $l[0] eq 'a' and 58 | $l[1] eq 'bar' and 59 | $l[2] eq 'c' and 60 | $l[3] eq 'foo' 61 | }; 62 | 63 | TEST { 64 | my @l = sort $o->a_values; 65 | $l[0] eq 'b' and 66 | $l[1] eq 'baz' and 67 | $l[2] eq 'baz2' and 68 | $l[3] eq 'd' 69 | }; 70 | 71 | TEST { $o->b_tally(qw / a b c a b a d / ); }; 72 | TEST { 73 | my %h = $o->b; 74 | $h{'a'} == 3 and 75 | $h{'b'} == 2 and 76 | $h{'c'} == 1 and 77 | $h{'d'} == 1 78 | }; 79 | 80 | # Test use of tie... 81 | TEST { 82 | my $y1 = new Y; 83 | my $y2 = new Y; 84 | $y2->foo ("test"); 85 | $o->b ( $y1 => $y2 ); 86 | $o->b ($y1)->foo eq "test"; 87 | }; 88 | 89 | exit 0; 90 | 91 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_tie_list.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package myArray; 6 | use Tie::Array ; 7 | 8 | @ISA=qw/Tie::StdArray/ ; 9 | 10 | use vars qw/$prefix/ ; 11 | 12 | $prefix = ''; 13 | 14 | sub TIEARRAY { 15 | my $class = shift; 16 | my $p = shift || ''; 17 | #print "prefix $p ($prefix))\n"; 18 | $prefix .= $p; 19 | return bless [], $class ; 20 | } 21 | 22 | sub FETCH { my ($self, $idx) = @_ ; 23 | #print "fetching $idx...\n"; 24 | return $prefix.$self->[$idx];} 25 | 26 | sub STORE { my ($self, $idx, $value) = @_ ; 27 | #print "storing $idx, $value ...\n"; 28 | $self->[$idx]=$value; 29 | return $value;} 30 | 31 | package X ; 32 | use ExtUtils::testlib; 33 | 34 | use Class::MethodMaker 35 | tie_list => 36 | [ 37 | a => ['myArray', "my "], 38 | ['b','c'] => ['myArray'] 39 | ], 40 | new => 'new'; 41 | 42 | package main; 43 | 44 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 45 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 46 | 47 | use ExtUtils::testlib; 48 | 49 | use Data::Dumper ; 50 | my $o = new X; 51 | 52 | TEST { 1 }; 53 | TEST {$o->a(qw/0 1 2/)} ; 54 | TEST {$o->b(qw/1 2 3 4/)} ; 55 | TEST {$o->c(qw/a s d f/)} ; 56 | 57 | my @r = $o->a ; 58 | 59 | #print Dumper $o ; 60 | 61 | TEST { $r[1] eq "my 1" }; 62 | 63 | TEST {$o->b_shift == 1}; # SHIFT not overloaded in myArray 64 | TEST {$o->c_count == 4}; 65 | 66 | exit 0; 67 | 68 | -------------------------------------------------------------------------------- /deps/Class-MethodMaker/t/v1_tie_scalar.t: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/perl 2 | use lib qw ( ./t ); 3 | use test_v1; 4 | 5 | package Y; 6 | 7 | use Carp; 8 | use strict; 9 | 10 | require Tie::Scalar ; 11 | 12 | sub TIESCALAR 13 | { 14 | my $type = shift; 15 | my %args = @_ ; 16 | my $self={} ; 17 | if (defined $args{enum}) 18 | { 19 | # store all enum values in a hash. This way, checking 20 | # whether a value is present in the enum set is easier 21 | map {$self->{enum}{$_} = 1;} @{$args{enum}} ; 22 | } 23 | else 24 | { 25 | croak ref($self)," error: no enum values defined when calling init"; 26 | } 27 | 28 | $self->{default} = $args{default}; 29 | bless $self,$type; 30 | } 31 | 32 | sub STORE 33 | { 34 | my ($self,$value) = @_ ; 35 | croak "cannot set ",ref($self)," item to $value. Expected ", 36 | join(' ',keys %{$self->{enum}}) 37 | unless defined $self->{enum}{$value} ; 38 | # we may want to check other rules here ... TBD 39 | $self->{value} = $value ; 40 | return $value; 41 | } 42 | 43 | 44 | sub FETCH 45 | { 46 | my $self = shift ; 47 | return defined $self->{value} ? $self->{value} : $self->{default} ; 48 | } 49 | 50 | package X ; 51 | use ExtUtils::testlib; 52 | 53 | use Class::MethodMaker 54 | tie_scalar => 55 | [ 56 | a => ['Y', 57 | enum => [qw/A B C/], 58 | default => 'B' ], 59 | ], 60 | new => 'new'; 61 | 62 | package main; 63 | 64 | Class::MethodMaker->VERSION eq '2.08' || Class::MethodMaker->VERSION >= 2.00 65 | or die "Wrong C::MM: ", Class::MethodMaker->VERSION, "\n"; 66 | 67 | use ExtUtils::testlib; 68 | 69 | my $o = new X; 70 | 71 | TEST { 1 }; 72 | TEST {$o->a eq 'B'} ; 73 | TEST {$o->a('A') eq 'A'} ; 74 | TEST {$o->a eq 'A'} ; 75 | 76 | exit 0; 77 | 78 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/COPYING: -------------------------------------------------------------------------------- 1 | This module is free software; you can redistribute it and/or modify it 2 | under the same terms as Perl itself. 3 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/MANIFEST: -------------------------------------------------------------------------------- 1 | SIGNATURE 2 | COPYING 3 | ChangeLog 4 | MANIFEST 5 | Makefile.PL 6 | NEWS 7 | README 8 | THANKS 9 | lib/GnuPG/Fingerprint.pm 10 | lib/GnuPG/Handles.pm 11 | lib/GnuPG/Interface.pm 12 | lib/GnuPG/Key.pm 13 | lib/GnuPG/Options.pm 14 | lib/GnuPG/PrimaryKey.pm 15 | lib/GnuPG/PublicKey.pm 16 | lib/GnuPG/UserId.pm 17 | lib/GnuPG/SecretKey.pm 18 | lib/GnuPG/Signature.pm 19 | lib/GnuPG/SubKey.pm 20 | t/GnuPG/ComparableFingerprint.pm 21 | t/GnuPG/ComparableKey.pm 22 | t/GnuPG/ComparablePrimaryKey.pm 23 | t/GnuPG/ComparablePublicKey.pm 24 | t/GnuPG/ComparableSecretKey.pm 25 | t/GnuPG/ComparableSignature.pm 26 | t/GnuPG/ComparableSubKey.pm 27 | t/GnuPG/ComparableUserId.pm 28 | t/Fingerprint.t 29 | t/Interface.t 30 | t/MyTest.pm 31 | t/MyTestSpecific.pm 32 | t/UserId.t 33 | t/clearsign.t 34 | t/decrypt.t 35 | t/detach_sign.t 36 | t/encrypt.t 37 | t/encrypt_symmetrically.t 38 | t/export_keys.t 39 | t/get_public_keys.t 40 | t/get_secret_keys.t 41 | t/import_keys.t 42 | t/list_public_keys.t 43 | t/list_secret_keys.t 44 | t/list_sigs.t 45 | t/passphrase_handling.t 46 | t/sign.t 47 | t/sign_and_encrypt.t 48 | t/verify.t 49 | t/wrap_call.t 50 | test/encrypted.1.gpg 51 | test/key.1.asc 52 | test/options 53 | test/passphrase 54 | test/plain.1.txt 55 | test/public-keys-sigs/1.0.test 56 | test/public-keys-sigs/1.1.test 57 | test/public-keys-sigs/2.0.test 58 | test/public-keys-sigs/2.1.test 59 | test/public-keys/1.0.test 60 | test/public-keys/1.1.test 61 | test/public-keys/2.0.test 62 | test/public-keys/2.1.test 63 | test/pubring.gpg 64 | test/secret-keys/1.0.test 65 | test/secret-keys/2.0.test 66 | test/secring.gpg 67 | test/signed.1.asc 68 | META.yml Module meta-data (added by MakeMaker) 69 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/META.yml: -------------------------------------------------------------------------------- 1 | --- #YAML:1.0 2 | name: GnuPG-Interface 3 | version: 0.36 4 | abstract: supply object methods for interacting with GnuPG 5 | license: ~ 6 | generated_by: ExtUtils::MakeMaker version 6.31 7 | distribution_type: module 8 | requires: 9 | Class::MethodMaker: 1 10 | meta-spec: 11 | url: http://module-build.sourceforge.net/META-spec-v1.2.html 12 | version: 1.2 13 | author: 14 | - Frank J. Tobin 15 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/Makefile.PL: -------------------------------------------------------------------------------- 1 | use 5.005; 2 | 3 | use strict; 4 | use English qw( -no_match_vars ); 5 | use ExtUtils::MakeMaker; 6 | 7 | use File::Find; 8 | use File::Spec; 9 | 10 | $WARNING = 1; 11 | 12 | my $gnupg_base = 'lib/GnuPG'; 13 | my $gnupg_install_base = "\$(INST_LIBDIR)"; 14 | my %pm_install_hash = (); 15 | 16 | my $gpg_find = 'which gpg'; 17 | print "$gpg_find ... "; 18 | system($gpg_find); 19 | if ($CHILD_ERROR != 0) 20 | { 21 | die "gpg (GnuPG) not found"; 22 | } 23 | 24 | find( \&set_pm_install_hash, $gnupg_base ); 25 | 26 | sub set_pm_install_hash 27 | { 28 | return unless /\.pm$/; 29 | 30 | my $install_path = $File::Find::name; 31 | $install_path =~ s/$gnupg_base/$gnupg_install_base/; 32 | $pm_install_hash{$File::Find::name} = $install_path; 33 | } 34 | 35 | 36 | WriteMakefile 37 | ( AUTHOR => 'Frank J. Tobin', 38 | ABSTRACT => 'supply object methods for interacting with GnuPG', 39 | NAME => 'GnuPG::Interface', 40 | VERSION_FROM => File::Spec->catfile( $gnupg_base, 'Interface.pm' ), 41 | 42 | PREREQ_PM => { 43 | 'Class::MethodMaker' => 1.00, 44 | }, 45 | 46 | PM => { %pm_install_hash }, 47 | 48 | dist => { 49 | COMPRESS => 'gzip', 50 | SUFFIX => 'gz', 51 | }, 52 | clean => { FILES => "test/*-keys*/*.out test/random_seed test/trustdb.gpg test/temp" } 53 | ); 54 | 55 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/NEWS: -------------------------------------------------------------------------------- 1 | Noteworthy changes in 0.35 2 | ----------------------------------------------------------------- 3 | 4 | * Changes are now tracked in the 'ChangeLog' file. 5 | (See that file for noteworthy changes) 6 | 7 | Noteworthy changes in 0.34 8 | ----------------------------------------------------------------- 9 | 10 | * Documentation fixes. 11 | 12 | 13 | Noteworthy changes in 0.33 14 | ----------------------------------------------------------------- 15 | 16 | * Fixed a bug in GnuPG::Interface->import_keys() so that 17 | it doesn't overwrite your 'command_args' anymore. 18 | Thanks to Peter Palfrader for 19 | pointing this out. 20 | 21 | 22 | Noteworthy changes in 0.32 23 | ----------------------------------------------------------------- 24 | 25 | * Extended the expiration on the test keys another 26 | 4 years so that the test suite works. 27 | 28 | * Documentation fixes. 29 | 30 | * Other small cleanups. 31 | 32 | 33 | Noteworthy changes in 0.31 34 | ----------------------------------------------------------------- 35 | 36 | * Fixed stalling test cases. 37 | 38 | * Added deprecation support for fields 39 | of GnuPG::Interface::wrap_call 40 | 41 | 42 | Noteworthy changes in 0.30 43 | ----------------------------------------------------------------- 44 | 45 | * Re-worked inheritance tree so that GnuPG::SecretKey 46 | and GnuPG::PublicKey are sub-classes of 47 | newly-added GnuPG::PrimaryKey. 48 | 49 | * Tested with GnuPG 1.0.5. 50 | 51 | * GnuPG::Fingerprint deprecate hex_data(), in favor 52 | of as_hex_string(). 53 | 54 | * GnuPG::UserId deprecates user_id_string(), in favor 55 | of as_string(). 56 | 57 | 58 | Noteworthy changes in 0.20 59 | ----------------------------------------------------------------- 60 | 61 | * Fixes for running under Perl 5.6.0 62 | (stdin, stdout, stderr filehandling changed). 63 | Thanks to Paul Walmsley, the_shag@users.sourceforge.net 64 | 65 | * Fix testing so that it works with GnuPG 1.0.4h. 66 | 67 | * Move a lot of testing code from inside the code 68 | to outside, so that it doesn't need to be loaded 69 | along with normal usage. This might help speed. 70 | 71 | * License is now the same terms as perl itself. 72 | 73 | * Don't ship with Class::MethodMaker 74 | 75 | Noteworthy changes in 0.11 76 | ----------------------------------------------------------------- 77 | 78 | * AutoLoader is now used correctly. 79 | 80 | * GnuPG::Options->no_comment() is no longer exists, for clarity. 81 | (It doesn't do what you think it does). 82 | 83 | * GnuPG::Options->comment() will now only not cause 84 | a --comment option to be used if it's value is undefined. 85 | This means you can do $gnupg->options->comment( '' ) 86 | to prevent a comment from being used. 87 | 88 | 89 | Noteworthy changes in 0.10 90 | ----------------------------------------------------------------- 91 | 92 | * GnuPG::Interface should work fine with the recently- 93 | released GnuPG 1.0.2. 94 | 95 | * GnuPG::Handles objects can now handle reading 96 | or writing directly from already-opened filehandles. 97 | This can allow a more 'natural' approach to 98 | having GnuPG read and write directly to files, 99 | with the exeption being that the user has to 100 | open these files beforehand. 101 | 102 | * Documentation created to describe the new accessing 103 | of open filehandle behaviour, and a FAQ started 104 | in GnuPG::Interface's docs. 105 | 106 | * Major code cleanup and other small docs cleanup. 107 | 108 | 109 | Noteworthy changes in 0.09 110 | ----------------------------------------------------------------- 111 | 112 | * Using GnuPG::Handles which are meant to be dupes 113 | is now more viable and documented. In particular, 114 | file descriptor numbers (properly prefixed, according 115 | to the open() documentation) can be used. 116 | This helps when using symbols and and object handles. 117 | 118 | 119 | Noteworthy changes in 0.08 120 | ----------------------------------------------------------------- 121 | 122 | * AutoLoader is now used; this may descrease 123 | compile-time. 124 | 125 | * Changes so that testing on recent development versions 126 | of GnuPG (namely 1.0.1e) works, or notably says 127 | that the error is occuring because of GnuPG version 128 | differences. 129 | 130 | 131 | Noteworthy changes in 0.07 132 | ----------------------------------------------------------------- 133 | 134 | * BACKWARDS COMPATIBILITY issue: 135 | GnuPG::Options->meta_signing_key() now expects 136 | an argument of type GnuPG::Object, instead of a scalar 137 | key id. See the following note for more details. 138 | 139 | * GnuPG::Options 'meta' methods that deal with keys arguments 140 | are more consistent now. Meta methods that accept key 141 | ids are now appended with _id(s); other meta methods 142 | that accept keys receive GnuPG::Key objects. 143 | 144 | 145 | Noteworthy changes in 0.06 146 | ----------------------------------------------------------------- 147 | 148 | * textmode option added to GnuPG::Options, and 149 | booleans of GnuPG::Options now make use 150 | of Class::MethodMaker's boolean usability. 151 | 152 | 153 | Noteworthy changes in 0.04 154 | ----------------------------------------------------------------- 155 | 156 | * This is a re-packaging release of 0.03. 157 | 158 | 159 | Noteworty changes in 0.03 160 | ----------------------------------------------------------------- 161 | 162 | * Documenation fixes. 163 | 164 | * GnuPG::Option meta-pgp5-compatibility bug fixed. 165 | 166 | 167 | Noteworty changes in 0.01 168 | ----------------------------------------------------------------- 169 | 170 | * Initial release 171 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/SIGNATURE: -------------------------------------------------------------------------------- 1 | This file contains message digests of all files listed in MANIFEST, 2 | signed via the Module::Signature module, version 0.55. 3 | 4 | To verify the content in this distribution, first make sure you have 5 | Module::Signature installed, then type: 6 | 7 | % cpansign -v 8 | 9 | It will check each file's integrity, as well as the signature's 10 | validity. If "==> Signature verified OK! <==" is not displayed, 11 | the distribution may already have been compromised, and you should 12 | not run its Makefile.PL or Build.PL. 13 | 14 | -----BEGIN PGP SIGNED MESSAGE----- 15 | Hash: SHA1 16 | 17 | SHA1 187c2cfc1fc31d42c18d5b1653afa1a905bf266c COPYING 18 | SHA1 5df20960703ba8651c67f36ed4ed601e0d0d4406 ChangeLog 19 | SHA1 ae07f475fb7a1668d2ffcfe090f99961ddb77d41 MANIFEST 20 | SHA1 7beeb96d32ce9fd224db1fe25052960fe640c464 Makefile.PL 21 | SHA1 d6e32c5128419cdbfe6e6f846ff7f64fc0adac2f NEWS 22 | SHA1 1047dc54823b1321e939274dd261d8e40febee24 README 23 | SHA1 df07bf5a2dd74ffe4b69dff3063f68879cf9e355 THANKS 24 | SHA1 d24732774ba9a4cbdda50a384cf8be663ecf91e6 lib/GnuPG/Fingerprint.pm 25 | SHA1 adafb2ff1a23ca10691bba5ab96d5e3c77bdaec5 lib/GnuPG/Handles.pm 26 | SHA1 70b42a050f887196450846dfe9436992cc29a921 lib/GnuPG/Interface.pm 27 | SHA1 742929758535fe82fe609a7d668355e7142eff8c lib/GnuPG/Key.pm 28 | SHA1 90204e29f8ba26267a882d1e2b1b4e56fefeeeeb lib/GnuPG/Options.pm 29 | SHA1 f84ba91c4ed3e47f1b5bba20c02e087ee3d90e73 lib/GnuPG/PrimaryKey.pm 30 | SHA1 d13ae0d9fff63041cbe9f89cb6bcf329e0b4d4e6 lib/GnuPG/PublicKey.pm 31 | SHA1 cbe00ca1d42f6a6dff5bc0cc3e3a9bf6687440fc lib/GnuPG/SecretKey.pm 32 | SHA1 ca90003145b6b6c71a963b96da8415e7f22e9c20 lib/GnuPG/Signature.pm 33 | SHA1 76a6d21bacb3d8c8e18715aaa2c06a0db695f4b0 lib/GnuPG/SubKey.pm 34 | SHA1 192f417f4bdb5398130362544cf6fb4c00b4e928 lib/GnuPG/UserId.pm 35 | SHA1 367fdb308292a9c005afffef49ff9096a20a4da3 t/Fingerprint.t 36 | SHA1 501ac69701ce51b3dd98f7f82a3c19a4fba6c3bd t/GnuPG/ComparableFingerprint.pm 37 | SHA1 ac3e4f640c0b7ffc2e6cc1a9d08546927614a456 t/GnuPG/ComparableKey.pm 38 | SHA1 e6902641f0e3300f8ecebb6c0ce07c47cb8978a9 t/GnuPG/ComparablePrimaryKey.pm 39 | SHA1 bc0131cf790f60fe21de67435516a78a18e5694c t/GnuPG/ComparablePublicKey.pm 40 | SHA1 ecee8534433307382b885eb19d0c6a74f0896e9b t/GnuPG/ComparableSecretKey.pm 41 | SHA1 7c0828fc937021847b5f1e857c4dd086169ceb72 t/GnuPG/ComparableSignature.pm 42 | SHA1 11224faf53b09044aa119fe40c09553a3bf4a091 t/GnuPG/ComparableSubKey.pm 43 | SHA1 69961a5efc193745729505e317db48cccd728cf0 t/GnuPG/ComparableUserId.pm 44 | SHA1 8791d014e4efd4cf11998386e1651cc4eb16dd26 t/Interface.t 45 | SHA1 698ec633be083b7e762331f1a5106c1618c74dd3 t/MyTest.pm 46 | SHA1 6fb9814ee5634f8c121ad4c38babb8f04334c6d9 t/MyTestSpecific.pm 47 | SHA1 ccd942d9f00627253d7eb9c011116dc5671639b8 t/UserId.t 48 | SHA1 16ac3a802f059cad9b7a0567eebe8b9599cc2551 t/clearsign.t 49 | SHA1 fab3deb7f60a0b5aae2f92b1c39804d1a4df2848 t/decrypt.t 50 | SHA1 67364d69fda2826735c8e39d50ea81a80d529a6c t/detach_sign.t 51 | SHA1 54d40d0d5233ad3097c5ca79032f38171334c7a4 t/encrypt.t 52 | SHA1 eeb2c355817cf641ad9e90e90f01007efce29cbe t/encrypt_symmetrically.t 53 | SHA1 a95b669219675ac2fadc8b5d3c49dcfd69609fe2 t/export_keys.t 54 | SHA1 f57e6d8b32fe81419244d3f38f5d9843ff0927c2 t/get_public_keys.t 55 | SHA1 43a2e400a6e38e7b64581d6863629de00e2752d9 t/get_secret_keys.t 56 | SHA1 a0f7dfa3778defadaf3600a7cfd69bfd027fdad2 t/import_keys.t 57 | SHA1 3355815cd188313a39116a661669ff92cebd701f t/list_public_keys.t 58 | SHA1 2ccb69c8a216e7f6db9faa2d6127561aeaa8130c t/list_secret_keys.t 59 | SHA1 17bccf75d6920c3d75dc3c8dbcdc0d0855275350 t/list_sigs.t 60 | SHA1 a8d213b81f23469460d8466520590bbeaee14aed t/passphrase_handling.t 61 | SHA1 1a20b9dac32bb1b40294e966de09eb89589a8891 t/sign.t 62 | SHA1 fa87a1405c58a951518003efd95700a9ca4b60ed t/sign_and_encrypt.t 63 | SHA1 6732202eb77e2d90af01f557d3e534812ec672af t/verify.t 64 | SHA1 09f7e2320231cfb923325fd474d76ff20d8c6c6b t/wrap_call.t 65 | SHA1 58f58338a2922798c59c5e852bd0110541f27e2d test/encrypted.1.gpg 66 | SHA1 b012a47f295ee9dcc955560b9a78c0ad3a61e137 test/key.1.asc 67 | SHA1 1290379acadab2cc713d659c7c3feff2b0923f75 test/options 68 | SHA1 4e1243bd22c66e76c2ba9eddc1f91394e57f9f83 test/passphrase 69 | SHA1 59c0e6436b38645144d17ce11ac4aabfdd43e960 test/plain.1.txt 70 | SHA1 7d94ea032bdbb0104c1dc73583ec64ade6294495 test/public-keys-sigs/1.0.test 71 | SHA1 63d93054decf9ff6c2dc99eb03f131b55af4ee43 test/public-keys-sigs/1.1.test 72 | SHA1 bd9892a93f802c68109b11b756f79f6b0292eb1a test/public-keys-sigs/2.0.test 73 | SHA1 73d90696020a01753cda984262a2831dcc6ac0d7 test/public-keys-sigs/2.1.test 74 | SHA1 82d483adc6d203c79856a70dd259370f6efdeef7 test/public-keys/1.0.test 75 | SHA1 86056ad37b8bb67d55ac61b5d5a27ac4bbd1cceb test/public-keys/1.1.test 76 | SHA1 a8e97a2439671dae0dd29a2404c321ccb686ba7a test/public-keys/2.0.test 77 | SHA1 54d2c13bf3b73b7582edef091175dfe3763ddf59 test/public-keys/2.1.test 78 | SHA1 5fa3777416ba09b8a396113dce6ddbf6a73b4b74 test/pubring.gpg 79 | SHA1 e740841597775e3da265ec14e411ed0432bae5e2 test/secret-keys/1.0.test 80 | SHA1 3bd6135279f9ae23e32680707c6170910421e5de test/secret-keys/2.0.test 81 | SHA1 4ae7541bb82abaef5573e61582c4dd4f96cc7f63 test/secring.gpg 82 | SHA1 981418a80bf7dab91b63608cfd1ddf5091f89ad7 test/signed.1.asc 83 | -----BEGIN PGP SIGNATURE----- 84 | Version: GnuPG v1.4.3 (Darwin) 85 | 86 | iD8DBQFGwIXrEi9d9xCOQEYRAhSQAJ9U5f8EkJZne2zphN0bH0n4LyGsgQCeJlQJ 87 | lifWJJP0osY0RQNcoQVcRkI= 88 | =M5Dc 89 | -----END PGP SIGNATURE----- 90 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/THANKS: -------------------------------------------------------------------------------- 1 | GnuPG::Interface was originally written by Frank Tobin. Other people 2 | contributed by reporting problems, suggesting various improvements or 3 | submitting actual code. Here is a list of those people. Help me keep 4 | it complete and free of errors. 5 | 6 | Daniel Kendall DKendall@osl1.co.uk 7 | Frank Tobin ftobin@cpan.org 8 | Paul Walmsley the_shag@users.sourceforge.net 9 | Peter Palfrader weasel@debian.org 10 | Walter Stanish walter@pratyeka.org 11 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/VERSION: -------------------------------------------------------------------------------- 1 | 0.36 2 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/Fingerprint.pm: -------------------------------------------------------------------------------- 1 | # Fingerprint.pm 2 | # - providing an object-oriented approach to GnuPG key fingerprints 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: Fingerprint.pm,v 1.8 2001/08/21 13:31:50 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::Fingerprint; 17 | 18 | use strict; 19 | 20 | use Class::MethodMaker 21 | get_set => [ qw( as_hex_string ) ], 22 | new_hash_init => 'new'; 23 | 24 | # DEPRECATED 25 | sub hex_data 26 | { 27 | my ( $self, $v ) = @_; 28 | $self->as_hex_string( $v ) if defined $v; 29 | return $self->as_hex_string(); 30 | } 31 | 32 | 1; 33 | 34 | __END__ 35 | 36 | =head1 NAME 37 | 38 | GnuPG::Fingerprint - GnuPG Fingerprint Objects 39 | 40 | =head1 SYNOPSIS 41 | 42 | # assumes a GnuPG::Key in $key 43 | my $fingerprint = $key->fingerprint->as_hex_string(); 44 | 45 | =head1 DESCRIPTION 46 | 47 | GnuPG::Fingerprint objects are generally part of GnuPG::Key 48 | objects, and are not created on their own. 49 | 50 | =head1 OBJECT METHODS 51 | 52 | =head2 Initialization Methods 53 | 54 | =over 4 55 | 56 | =item new( I<%initialization_args> ) 57 | 58 | This methods creates a new object. The optional arguments are 59 | initialization of data members; the initialization is done 60 | in a manner according to the method created as described 61 | in L. 62 | 63 | =item hash_init( I<%args> ). 64 | 65 | This method works as described in L. 66 | 67 | =back 68 | 69 | =head1 OBJECT DATA MEMBERS 70 | 71 | Note that these data members are interacted with via object methods 72 | created using the methods described in L, 73 | or L. 74 | Please read there for more information. 75 | 76 | =over 4 77 | 78 | =item as_hex_string 79 | 80 | This is the hex value of the fingerprint that the object embodies, 81 | in string format. 82 | 83 | =back 84 | 85 | =head1 SEE ALSO 86 | 87 | L, 88 | L 89 | 90 | =cut 91 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/Handles.pm: -------------------------------------------------------------------------------- 1 | # Handles.pm 2 | # - interface to the handles used by GnuPG::Interface 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: Handles.pm,v 1.8 2001/12/09 02:24:10 ftobin Exp $ 14 | # 15 | 16 | 17 | package GnuPG::Handles; 18 | 19 | use strict; 20 | 21 | use constant HANDLES => qw( stdin stdout stderr 22 | status logger passphrase 23 | command 24 | ); 25 | 26 | use Class::MethodMaker 27 | get_set => [ HANDLES ], 28 | hash => [ qw( options ) ], 29 | new_with_init => 'new', 30 | new_hash_init => 'hash_init'; 31 | 32 | 33 | sub init 34 | { 35 | my ( $self, %args ) = @_; 36 | # This is done for the user's convenience so that they don't 37 | # have to worry about undefined hashrefs 38 | foreach my $handle ( HANDLES ) { $self->options( $handle, {} ) } 39 | $self->hash_init( %args ); 40 | } 41 | 42 | 43 | 44 | 1; 45 | 46 | 47 | =head1 NAME 48 | 49 | GnuPG::Handles - GnuPG handles bundle 50 | 51 | =head1 SYNOPSIS 52 | 53 | use IO::Handle; 54 | my ( $stdin, $stdout, $stderr, 55 | $status_fh, $logger_fh, $passphrase_fh, 56 | ) 57 | = ( IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), 58 | IO::Handle->new(), IO::Handle->new(), IO::Handle->new(), 59 | ); 60 | 61 | my $handles = GnuPG::Handles->new 62 | ( stdin => $stdin, 63 | stdout => $stdout, 64 | stderr => $stderr, 65 | status => $status_fh, 66 | logger => $logger_fh, 67 | passphrase => $passphrase_fh, 68 | ); 69 | 70 | =head1 DESCRIPTION 71 | 72 | GnuPG::Handles objects are generally instantiated 73 | to be used in conjunction with methods of objects 74 | of the class GnuPG::Interface. GnuPG::Handles objects 75 | represent a collection of handles that are used to 76 | communicate with GnuPG. 77 | 78 | =head1 OBJECT METHODS 79 | 80 | =head2 Initialization Methods 81 | 82 | =over 4 83 | 84 | =item new( I<%initialization_args> ) 85 | 86 | This methods creates a new object. The optional arguments are 87 | initialization of data members; the initialization is done 88 | in a manner according to the method created as described 89 | in L. 90 | 91 | =item hash_init( I<%args> ). 92 | 93 | This method works as described in L. 94 | 95 | =back 96 | 97 | =head1 OBJECT DATA MEMBERS 98 | 99 | Note that these data members are interacted with via object methods 100 | created using the methods described in L, 101 | or L. 102 | Please read there for more information. 103 | 104 | =over 4 105 | 106 | =item stdin 107 | 108 | This handle is connected to the standard input of a GnuPG process. 109 | 110 | =item stdout 111 | 112 | This handle is connected to the standard output of a GnuPG process. 113 | 114 | =item stderr 115 | 116 | This handle is connected to the standard error of a GnuPG process. 117 | 118 | =item status 119 | 120 | This handle is connected to the status output handle of a GnuPG process. 121 | 122 | =item logger 123 | 124 | This handle is connected to the logger output handle of a GnuPG process. 125 | 126 | =item passphrase 127 | 128 | This handle is connected to the passphrase input handle of a GnuPG process. 129 | 130 | =item command 131 | 132 | This handle is connected to the command input handle of a GnuPG process. 133 | 134 | =item options 135 | 136 | This is a hash of hashrefs of settings pertaining to the handles 137 | in this object. The outer-level hash is keyed by the names of the 138 | handle the setting is for, while the inner is keyed by the setting 139 | being referenced. For example, to set the setting C to true 140 | for the filehandle C, the following code will do: 141 | 142 | # assuming $handles is an already-created 143 | # GnuPG::Handles object, this sets all 144 | # options for the filehandle stdin in one blow, 145 | # clearing out all others 146 | $handles->options( 'stdin', { direct => 1 } ); 147 | 148 | # this is useful to just make one change 149 | # to the set of options for a handle 150 | $handles->options( 'stdin' )->{direct} = 1; 151 | 152 | # and to get the setting... 153 | $setting = $handles->options( 'stdin' )->{direct}; 154 | 155 | # and to clear the settings for stdin 156 | $handles->options( 'stdin', {} ); 157 | 158 | The currently-used settings are as follows: 159 | 160 | =over 4 161 | 162 | =item direct 163 | 164 | If the setting C is true for a handle, the GnuPG 165 | process spawned will access the handle directly. This is useful for 166 | having the GnuPG process read or write directly to or from 167 | an already-opened file. 168 | 169 | =back 170 | 171 | =back 172 | 173 | =head1 SEE ALSO 174 | 175 | L, 176 | L 177 | 178 | =cut 179 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/Key.pm: -------------------------------------------------------------------------------- 1 | # Key.pm 2 | # - providing an object-oriented approach to GnuPG keys 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: Key.pm,v 1.10 2001/12/10 01:29:27 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::Key; 17 | 18 | use strict; 19 | 20 | use Class::MethodMaker 21 | get_set => [ qw( length algo_num hex_id hex_data 22 | creation_date_string expiration_date_string 23 | fingerprint 24 | ) ], 25 | new_hash_init => [ qw( new hash_init ) ]; 26 | 27 | 28 | sub short_hex_id 29 | { 30 | my ( $self ) = @_; 31 | return substr $self->hex_id(), -8; 32 | } 33 | 34 | 1; 35 | 36 | __END__ 37 | 38 | =head1 NAME 39 | 40 | GnuPG::Key - GnuPG Key Object 41 | 42 | =head1 SYNOPSIS 43 | 44 | # assumes a GnuPG::Interface object in $gnupg 45 | my @keys = $gnupg->get_public_keys( 'ftobin' ); 46 | 47 | # now GnuPG::PublicKey objects are in @keys 48 | 49 | =head1 DESCRIPTION 50 | 51 | GnuPG::Key objects are generally not instantiated on their 52 | own, but rather used as a superclass of GnuPG::PublicKey, 53 | GnuPG::SecretKey, or GnuPG::SubKey objects. 54 | 55 | =head1 OBJECT METHODS 56 | 57 | =head2 Initialization Methods 58 | 59 | =over 4 60 | 61 | =item new( I<%initialization_args> ) 62 | 63 | This methods creates a new object. The optional arguments are 64 | initialization of data members; the initialization is done 65 | in a manner according to the method created as described 66 | in L. 67 | 68 | =item hash_init( I<%args> ). 69 | 70 | This method works as described in L. 71 | 72 | =item short_hex_id 73 | 74 | This returns the commonly-used short, 8 character short hex id 75 | of the key. 76 | 77 | =back 78 | 79 | =head1 OBJECT DATA MEMBERS 80 | 81 | Note that these data members are interacted with via object methods 82 | created using the methods described in L, 83 | or L. 84 | Please read there for more information. 85 | 86 | =over 4 87 | 88 | =item length 89 | 90 | Number of bits in the key. 91 | 92 | =item algo_num 93 | 94 | They algorithm number that the Key is used for. 95 | 96 | =item hex_data 97 | 98 | The data of the key. 99 | 100 | =item hex_id 101 | 102 | The long hex id of the key. This is not the fingerprint nor 103 | the short hex id, which is 8 hex characters. 104 | 105 | =item creation_date_string 106 | =item expiration_date_string 107 | 108 | Formatted date of the key's creation and expiration. 109 | 110 | =item fingerprint 111 | 112 | A GnuPG::Fingerprint object. 113 | 114 | =back 115 | 116 | =head1 SEE ALSO 117 | 118 | L, 119 | L 120 | 121 | =cut 122 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/PrimaryKey.pm: -------------------------------------------------------------------------------- 1 | # PrimaryKey.pm 2 | # - objectified GnuPG primary keys (can have subkeys) 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: PrimaryKey.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::PrimaryKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::Key ); 21 | 22 | use Class::MethodMaker 23 | list => [ qw( user_ids subkeys ) ], 24 | get_set => [ qw( local_id owner_trust ) ]; 25 | 26 | 1; 27 | 28 | __END__ 29 | 30 | =head1 NAME 31 | 32 | GnuPG::PrimaryKey - GnuPG Primary Key Objects 33 | 34 | =head1 SYNOPSIS 35 | 36 | # assumes a GnuPG::Interface object in $gnupg 37 | my @keys = $gnupg->get_public_keys( 'ftobin' ); 38 | 39 | # or 40 | 41 | my @keys = $gnupg->get_secret_keys( 'ftobin' ); 42 | 43 | # now GnuPG::PrimaryKey objects are in @keys 44 | 45 | =head1 DESCRIPTION 46 | 47 | GnuPG::PrimaryKey objects are generally instantiated 48 | as GnuPG::PublicKey or GnuPG::SecretKey objects 49 | through various methods of GnuPG::Interface. 50 | They embody various aspects of a GnuPG primary key. 51 | 52 | This package inherits data members and object methods 53 | from GnuPG::Key, which is not described here, but rather 54 | in L. 55 | 56 | =head1 OBJECT DATA MEMBERS 57 | 58 | Note that these data members are interacted with via object methods 59 | created using the methods described in L, 60 | L, or L. 61 | Please read there for more information. 62 | 63 | =over 4 64 | 65 | =item user_ids 66 | 67 | A list of GnuPG::UserId objects associated with this key. 68 | 69 | =item subkeys 70 | 71 | A list of GnuPG::SubKey objects associated with this key. 72 | 73 | =item local_id 74 | 75 | GnuPG's local id for the key. 76 | 77 | =item owner_trust 78 | 79 | The scalar value GnuPG reports as the ownertrust for this key. 80 | See GnuPG's DETAILS file for details. 81 | 82 | =back 83 | 84 | =head1 SEE ALSO 85 | 86 | L, 87 | L, 88 | L, 89 | L 90 | 91 | =cut 92 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/PublicKey.pm: -------------------------------------------------------------------------------- 1 | # PublicKey.pm 2 | # - providing an object-oriented approach to GnuPG public keys 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: PublicKey.pm,v 1.9 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::PublicKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::PrimaryKey ); 21 | 22 | 1; 23 | 24 | __END__ 25 | 26 | =head1 NAME 27 | 28 | GnuPG::PublicKey - GnuPG Public Key Objects 29 | 30 | =head1 SYNOPSIS 31 | 32 | # assumes a GnuPG::Interface object in $gnupg 33 | my @keys = $gnupg->get_public_keys( 'ftobin' ); 34 | 35 | # now GnuPG::PublicKey objects are in @keys 36 | 37 | =head1 DESCRIPTION 38 | 39 | GnuPG::PublicKey objects are generally instantiated 40 | through various methods of GnuPG::Interface. 41 | They embody various aspects of a GnuPG public key. 42 | 43 | This package inherits data members and object methods 44 | from GnuPG::PrimaryKey, which is described here, but rather 45 | in L. 46 | 47 | Currently, this package is functionally no different 48 | from GnuPG::PrimaryKey. 49 | 50 | =head1 SEE ALSO 51 | 52 | L, 53 | 54 | =cut 55 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/SecretKey.pm: -------------------------------------------------------------------------------- 1 | # SecretKey.pm 2 | # - providing an object-oriented approach to GnuPG secret keys 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: SecretKey.pm,v 1.9 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::SecretKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::PrimaryKey ); 21 | 22 | 1; 23 | 24 | __END__ 25 | 26 | =head1 NAME 27 | 28 | GnuPG::SecretKey - GnuPG Secret Key Objects 29 | 30 | =head1 SYNOPSIS 31 | 32 | # assumes a GnuPG::Interface object in $gnupg 33 | my @keys = $gnupg->get_secret_keys( 'ftobin' ); 34 | 35 | # now GnuPG::SecretKey objects are in @keys 36 | 37 | =head1 DESCRIPTION 38 | 39 | GnuPG::SecretKey objects are generally instantiated 40 | through various methods of GnuPG::Interface. 41 | They embody various aspects of a GnuPG secret key. 42 | 43 | This package inherits data members and object methods 44 | from GnuPG::PrimaryKey, which is described here, but rather 45 | in L. 46 | 47 | Currently, this package is functionally no different 48 | from GnuPG::PrimaryKey. 49 | 50 | =head1 SEE ALSO 51 | 52 | L, 53 | 54 | =cut 55 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/Signature.pm: -------------------------------------------------------------------------------- 1 | # Signature.pm 2 | # - providing an object-oriented approach to GnuPG key signatures 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: Signature.pm,v 1.4 2001/08/21 13:31:50 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::Signature; 17 | 18 | use strict; 19 | 20 | use Class::MethodMaker 21 | get_set => [ qw( algo_num hex_id user_id_string 22 | date_string 23 | ) ], 24 | new_hash_init => 'new'; 25 | 26 | 1; 27 | 28 | __END__ 29 | 30 | =head1 NAME 31 | 32 | GnuPG::Signature - GnuPG Key Signature Objects 33 | 34 | =head1 SYNOPSIS 35 | 36 | # assumes a GnuPG::SubKey object in $key 37 | my $signing_id = $key->signature->hex_id(); 38 | 39 | =head1 DESCRIPTION 40 | 41 | GnuPG::Signature objects are generally not instantiated 42 | on their own, but rather as part of GnuPG::Key objects. 43 | They embody various aspects of a GnuPG signature on a key. 44 | 45 | =head1 OBJECT METHODS 46 | 47 | =over 4 48 | 49 | =item new( I<%initialization_args> ) 50 | 51 | This methods creates a new object. The optional arguments are 52 | initialization of data members; the initialization is done 53 | in a manner according to the method created as described 54 | in L. 55 | 56 | =back 57 | 58 | =head1 OBJECT DATA MEMBERS 59 | 60 | Note that these data members are interacted with via object methods 61 | created using the methods described in L, 62 | L, or L. 63 | Please read there for more information. 64 | 65 | =over 4 66 | 67 | =item algo_num 68 | 69 | The number of the algorithm used for the signature. 70 | 71 | =item hex_id 72 | 73 | The hex id of the signing key. 74 | 75 | =item user_id_string 76 | 77 | The first user id string on the key that made the signature. 78 | This may not be defined if the signing key is not on the local keyring. 79 | 80 | =item date_string 81 | 82 | The formatted date the signature was performed on. 83 | 84 | =back 85 | 86 | =head1 SEE ALSO 87 | 88 | See also L. 89 | 90 | =cut 91 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/SubKey.pm: -------------------------------------------------------------------------------- 1 | # SubKey.pm 2 | # - providing an object-oriented approach to GnuPG sub keys 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: SubKey.pm,v 1.9 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::SubKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::Key ); 21 | 22 | use Class::MethodMaker 23 | get_set => [ qw( validity owner_trust local_id signature ) ]; 24 | 25 | 1; 26 | 27 | __END__ 28 | 29 | =head1 NAME 30 | 31 | GnuPG::SubKey - GnuPG Sub Key objects 32 | 33 | =head1 SYNOPSIS 34 | 35 | # assumes a GnuPG::PublicKey object in $key 36 | my @subkeys = $key->subkeys(); 37 | 38 | # now GnuPG::SubKey objects are in @subkeys 39 | 40 | =head1 DESCRIPTION 41 | 42 | GnuPG::SubKey objects are generally instantiated 43 | through various methods of GnuPG::Interface. 44 | They embody various aspects of a GnuPG sub key. 45 | 46 | This package inherits data members and object methods 47 | from GnuPG::Key, which are not described here, but rather 48 | in L. 49 | 50 | =head1 OBJECT DATA MEMBERS 51 | 52 | Note that these data members are interacted with via object methods 53 | created using the methods described in L, 54 | L, or L. 55 | Please read there for more information. 56 | 57 | =over 4 58 | 59 | =item validity 60 | 61 | A scalar holding the value GnuPG reports for the trust of authenticity 62 | (a.k.a.) validity of a key. 63 | See GnuPG's DETAILS file for details. 64 | 65 | =item local_id 66 | 67 | GnuPG's local id for the key. 68 | 69 | =item owner_trust 70 | 71 | The scalar value GnuPG reports as the ownertrust for this key. 72 | See GnuPG's DETAILS file for details. 73 | 74 | =item signature 75 | 76 | A GnuPG::Signature object holding the representation of the 77 | signature on this key. 78 | 79 | =back 80 | 81 | =head1 SEE ALSO 82 | 83 | L, 84 | L, 85 | L 86 | 87 | =cut 88 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/lib/GnuPG/UserId.pm: -------------------------------------------------------------------------------- 1 | # UserId.pm 2 | # - providing an object-oriented approach to GnuPG user ids 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: UserId.pm,v 1.7 2001/08/21 13:31:50 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::UserId; 17 | 18 | use strict; 19 | 20 | use Class::MethodMaker 21 | get_set => [ qw( validity as_string ) ], 22 | list => [ qw( signatures ) ], 23 | new_hash_init => 'new'; 24 | 25 | # DEPRECATED 26 | sub user_id_string 27 | { 28 | my ( $self, $v ) = @_; 29 | $self->as_string( $v ) if defined $v; 30 | return $self->as_string(); 31 | } 32 | 33 | 1; 34 | 35 | __END__ 36 | 37 | =head1 NAME 38 | 39 | GnuPG::UserId - GnuPG User ID Objects 40 | 41 | =head1 SYNOPSIS 42 | 43 | # assumes a GnuPG::PublicKey object in $publickey 44 | my $user_id = $publickey->user_ids_ref->[0]->as_string; 45 | 46 | =head1 DESCRIPTION 47 | 48 | GnuPG::UserId objects are generally not instantiated on their 49 | own, but rather as part of GnuPG::PublicKey or GnuPG::SecretKey 50 | objects. 51 | 52 | =head1 OBJECT METHODS 53 | 54 | =over 4 55 | 56 | =item new( I<%initialization_args> ) 57 | 58 | This methods creates a new object. The optional arguments are 59 | initialization of data members; the initialization is done 60 | in a manner according to the method created as described 61 | in L. 62 | 63 | =back 64 | 65 | =head1 OBJECT DATA MEMBERS 66 | 67 | Note that these data members are interacted with via object methods 68 | created using the methods described in L, 69 | L, or L. 70 | Please read there for more information. 71 | 72 | =over 4 73 | 74 | =item as_string 75 | 76 | A string of the user id. 77 | 78 | =item validity 79 | 80 | A scalar holding the value GnuPG reports for the trust of authenticity 81 | (a.k.a.) validity of a key. 82 | See GnuPG's DETAILS file for details. 83 | 84 | =item signatures 85 | 86 | A list of GnuPG::Signature objects embodying the signatures 87 | on this user id. 88 | 89 | =back 90 | 91 | =head1 SEE ALSO 92 | 93 | L, 94 | L 95 | 96 | =cut 97 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/Fingerprint.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: Fingerprint.t,v 1.1 2001/04/30 01:36:12 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | 8 | use lib './t'; 9 | use MyTest; 10 | 11 | use GnuPG::Fingerprint; 12 | 13 | my $v1 = '5A29DAE3649ACCA7BF59A67DBAED721F334C9V14'; 14 | my $v2 = '4F863BBBA8166F0A340F600356FFD10A260C4FA3'; 15 | 16 | my $fingerprint = GnuPG::Fingerprint->new( as_hex_string => $v1 ); 17 | 18 | # deprecation test 19 | TEST 20 | { 21 | $fingerprint->hex_data() eq $v1; 22 | }; 23 | 24 | # deprecation test 25 | TEST 26 | { 27 | $fingerprint->hex_data( $v2 ); 28 | $fingerprint->as_hex_string() eq $v2; 29 | }; 30 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableFingerprint.pm: -------------------------------------------------------------------------------- 1 | # ComparableFingerprint.pm 2 | # - comparable GnuPG::Fingerprint 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableFingerprint.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableFingerprint; 17 | 18 | use strict; 19 | 20 | use base qw(GnuPG::Fingerprint ); 21 | 22 | sub compare 23 | { 24 | my ( $self, $other ) = @_; 25 | 26 | return $self->as_hex_string() eq $other->as_hex_string(); 27 | } 28 | 29 | 1; 30 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableKey.pm: -------------------------------------------------------------------------------- 1 | # ComparableKey.pm 2 | # - comparable GnuPG::Key 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableKey.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableKey; 17 | 18 | use strict; 19 | use GnuPG::Fingerprint; 20 | 21 | use base qw( GnuPG::Key ); 22 | 23 | sub compare 24 | { 25 | my ( $self, $other, $deep ) = @_; 26 | 27 | # expiration_date_string was taken out of the following 28 | # list because there is a bug in the listing of 29 | # expiration dates in 1.0.5 30 | my @comparison_fields 31 | = qw( length algo_num hex_id 32 | creation_date_string 33 | ); 34 | 35 | foreach my $field ( @comparison_fields ) 36 | { 37 | # don't test for definedness because 38 | # all fields should be defined 39 | return 0 unless $self->$field() eq $other->$field(); 40 | } 41 | 42 | return $self->_deeply_compare( $other ) if $deep; 43 | 44 | return 1; 45 | } 46 | 47 | 48 | sub _deeply_compare 49 | { 50 | my ( $self, $other ) = @_; 51 | bless $self->fingerprint(), 'GnuPG::ComparableFingerprint'; 52 | 53 | return ( $self->fingerprint->compare( $other->fingerprint() ) ); 54 | } 55 | 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparablePrimaryKey.pm: -------------------------------------------------------------------------------- 1 | # ComparablePrimaryKey.pm 2 | # - Comparable GnuPG::PrimaryKey 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparablePrimaryKey.pm,v 1.3 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparablePrimaryKey; 17 | 18 | use strict; 19 | use GnuPG::ComparableSubKey; 20 | 21 | use base qw( GnuPG::PrimaryKey GnuPG::ComparableKey ); 22 | 23 | sub _deeply_compare 24 | { 25 | my ( $self, $other ) = @_; 26 | 27 | my @self_subkeys = $self->subkeys(); 28 | my @other_subkeys = $other->subkeys(); 29 | 30 | return 0 unless @self_subkeys == @other_subkeys; 31 | 32 | my $num_subkeys = @self_subkeys; 33 | 34 | for ( my $i = 0; $i < $num_subkeys; $i++ ) 35 | { 36 | my $subkey1 = $self_subkeys[$i]; 37 | my $subkey2 = $other_subkeys[$i]; 38 | 39 | bless $subkey1, 'GnuPG::ComparableSubKey'; 40 | 41 | return 0 unless $subkey1->compare( $subkey2, 1 ); 42 | } 43 | 44 | # don't compare user id's because their ordering 45 | # is not necessarily deterministic 46 | 47 | $self->SUPER::_deeply_compare( $other ); 48 | 49 | return 1; 50 | } 51 | 52 | 1; 53 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparablePublicKey.pm: -------------------------------------------------------------------------------- 1 | # ComparablePublicKey.pm 2 | # - Comparable GnuPG::PublicKeys 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparablePublicKey.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparablePublicKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::PublicKey GnuPG::ComparablePrimaryKey ); 21 | 22 | 1; 23 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableSecretKey.pm: -------------------------------------------------------------------------------- 1 | # ComparableSecretKey.pm 2 | # - Comparable GnuPG::SecretKey 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableSecretKey.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableSecretKey; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::SecretKey GnuPG::ComparablePrimaryKey ); 21 | 22 | 1; 23 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableSignature.pm: -------------------------------------------------------------------------------- 1 | # ComparableSignature.pm 2 | # - comparable GnuPG::Signature 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableSignature.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableSignature; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::Signature ); 21 | 22 | sub compare 23 | { 24 | my ( $self, $other ) = @_; 25 | 26 | my @compared_fields = qw( algo_num hex_id date_string ); 27 | 28 | foreach my $field ( @compared_fields ) 29 | { 30 | my $f1 = $self->$field(); 31 | my $f2 = $other->$field(); 32 | 33 | # don't test for definedness because 34 | # all fields should be defined 35 | return 0 unless $self->$field() eq $other->$field(); 36 | } 37 | 38 | return 1; 39 | } 40 | 41 | 1; 42 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableSubKey.pm: -------------------------------------------------------------------------------- 1 | # ComparableSubKey.pm 2 | # - comparable GnuPG::SubKey 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableSubKey.pm,v 1.4 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableSubKey; 17 | 18 | use strict; 19 | use GnuPG::ComparableSignature; 20 | use GnuPG::ComparableFingerprint; 21 | 22 | use base qw( GnuPG::SubKey GnuPG::ComparableKey ); 23 | 24 | sub compare 25 | { 26 | my ( $self, $other, $deep ) = @_; 27 | 28 | if ( $deep ) 29 | { 30 | bless $self->signature, 'GnuPG::ComparableSignature' 31 | if $self->signature(); 32 | bless $self->fingerprint, 'GnuPG::ComparableFingerprint' 33 | if $self->fingerprint(); 34 | 35 | foreach my $field ( qw( signature fingerprint ) ) 36 | { 37 | my $f1 = $self->$field(); 38 | my $f2 = $other->$field(); 39 | 40 | # if neither are filled in, don't compare this 41 | next if not $f1 or not $f2; 42 | 43 | # if one is filled in, but not the other 44 | # we say they are different 45 | return 0 if $f1 xor $f2; 46 | 47 | $f1->compare( $f2, 1 ); 48 | } 49 | } 50 | 51 | return $self->SUPER::compare( $other, $deep ) 52 | } 53 | 54 | 1; 55 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/GnuPG/ComparableUserId.pm: -------------------------------------------------------------------------------- 1 | # ComparableUserId.pm 2 | # - providing an object-oriented approach to GnuPG user ids 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: ComparableUserId.pm,v 1.3 2001/09/14 12:34:36 ftobin Exp $ 14 | # 15 | 16 | package GnuPG::ComparableUserId; 17 | 18 | use strict; 19 | 20 | use base qw( GnuPG::UserId ); 21 | 22 | sub compare 23 | { 24 | my ( $self, $other, $deep ) = @_; 25 | 26 | return 0 unless $self->user_id_string() eq $other->user_id_string(); 27 | return 0 unless $self->_deeply_compare( $other ); 28 | return 1; 29 | } 30 | 31 | 32 | sub _deeply_compare 33 | { 34 | my ( $self, $other ) = @_; 35 | 36 | return 0 unless 37 | $self->rigorously_compare( $other ); 38 | 39 | my @self_signatures = $self->signatures(); 40 | my @other_signatures = $other->signatures(); 41 | 42 | return 0 unless @self_signatures == @other_signatures; 43 | 44 | my $num_sigs = @self_signatures; 45 | 46 | for ( my $i = 0; $i < $num_sigs; $i++ ) 47 | { 48 | 49 | return 0 50 | unless $self_signatures[$i]->compare( $other_signatures[$i], 1 ); 51 | } 52 | 53 | return 1; 54 | } 55 | 56 | 57 | 1; 58 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/Interface.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: Interface.t,v 1.1 2001/04/30 02:04:25 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | 8 | use lib './t'; 9 | use MyTest; 10 | 11 | use GnuPG::Interface; 12 | 13 | my $v1 = 'gpg'; 14 | my $v2 = 'gnupg'; 15 | 16 | my $gnupg = GnuPG::Interface->new( call => $v1 ); 17 | 18 | # deprecation test 19 | TEST 20 | { 21 | $gnupg->gnupg_call() eq $v1; 22 | }; 23 | 24 | # deprecation test 25 | TEST 26 | { 27 | $gnupg->gnupg_call( $v2 ); 28 | $gnupg->call() eq $v2; 29 | }; 30 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/MyTest.pm: -------------------------------------------------------------------------------- 1 | # MyTest.pm 2 | # - module for use with test scripts 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: MyTest.pm,v 1.3 2001/08/21 13:31:50 ftobin Exp $ 14 | # 15 | 16 | package MyTest; 17 | 18 | use strict; 19 | use English qw( -no_match_vars ); 20 | use Exporter; 21 | use IO::File; 22 | use vars qw( @ISA @EXPORT ); 23 | 24 | @ISA = qw( Exporter ); 25 | @EXPORT = qw( TEST ); 26 | 27 | $OUTPUT_AUTOFLUSH = 1; 28 | 29 | print "1..", COUNT_TESTS(), "\n"; 30 | 31 | my $counter = 0; 32 | 33 | sub TEST ( & ) 34 | { 35 | my ( $code ) = @_; 36 | 37 | $counter++; 38 | 39 | &$code or print "not "; 40 | print "ok $counter\n"; 41 | } 42 | 43 | 44 | sub COUNT_TESTS 45 | { 46 | my ( $file ) = @_; 47 | $file ||= $PROGRAM_NAME; 48 | 49 | my $tests = 0; 50 | 51 | my $in = IO::File->new( $file ); 52 | 53 | while ( $_ = $in->getline() ) 54 | { 55 | $tests++ 56 | if /^\s*TEST\s*/; 57 | } 58 | 59 | return $tests; 60 | } 61 | 62 | 63 | 1; 64 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/MyTestSpecific.pm: -------------------------------------------------------------------------------- 1 | # MyTestSpecific.pm 2 | # - module for use with test scripts 3 | # 4 | # Copyright (C) 2000 Frank J. Tobin 5 | # 6 | # This module is free software; you can redistribute it and/or modify it 7 | # under the same terms as Perl itself. 8 | # 9 | # This program is distributed in the hope that it will be useful, 10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # 13 | # $Id: MyTestSpecific.pm,v 1.7 2001/08/21 13:31:50 ftobin Exp $ 14 | # 15 | 16 | use strict; 17 | use English qw( -no_match_vars ); 18 | use Fatal qw/ open close /; 19 | use IO::File; 20 | use IO::Handle; 21 | use IO::Seekable; 22 | use File::Compare; 23 | use Exporter; 24 | use Class::Struct; 25 | 26 | use GnuPG::Interface; 27 | use GnuPG::Handles; 28 | 29 | use vars qw( @ISA @EXPORT 30 | $stdin $stdout $stderr 31 | $gpg_program $handles $gnupg 32 | %texts 33 | ); 34 | 35 | @ISA = qw( Exporter ); 36 | @EXPORT = qw( stdin stdout stderr 37 | gnupg_program handles reset_handles 38 | texts file_match 39 | ); 40 | 41 | 42 | $gpg_program = 'gpg'; 43 | 44 | $gnupg = GnuPG::Interface->new( gnupg_call => $gpg_program, 45 | passphrase => 'test', 46 | ); 47 | 48 | $gnupg->options->hash_init( homedir => 'test', 49 | armor => 1, 50 | meta_interactive => 0, 51 | meta_signing_key_id => '0xF950DA9C', 52 | always_trust => 1, 53 | ); 54 | 55 | struct( Text => { fn => "\$", fh => "\$", data => "\$" } ); 56 | 57 | $texts{plain} = Text->new(); 58 | $texts{plain}->fn( 'test/plain.1.txt' ); 59 | 60 | $texts{encrypted} = Text->new(); 61 | $texts{encrypted}->fn( 'test/encrypted.1.gpg' ); 62 | 63 | $texts{signed} = Text->new(); 64 | $texts{signed}->fn( 'test/signed.1.asc' ); 65 | 66 | $texts{key} = Text->new(); 67 | $texts{key}->fn( 'test/key.1.asc' ); 68 | 69 | $texts{temp} = Text->new(); 70 | $texts{temp}->fn( 'test/temp' ); 71 | 72 | 73 | foreach my $name ( qw( plain encrypted signed key ) ) 74 | { 75 | my $entry = $texts{$name}; 76 | my $filename = $entry->fn(); 77 | my $fh = IO::File->new( $filename ) 78 | or die "cannot open $filename: $ERRNO"; 79 | $entry->data( [ $fh->getlines() ] ); 80 | } 81 | 82 | sub reset_handles 83 | { 84 | foreach ( $stdin, $stdout, $stderr ) 85 | { 86 | $_ = IO::Handle->new(); 87 | } 88 | 89 | $handles = GnuPG::Handles->new 90 | ( stdin => $stdin, 91 | stdout => $stdout, 92 | stderr => $stderr 93 | ); 94 | 95 | foreach my $name ( qw( plain encrypted signed key ) ) 96 | { 97 | my $entry = $texts{$name}; 98 | my $filename = $entry->fn(); 99 | my $fh = IO::File->new( $filename ) 100 | or die "cannot open $filename: $ERRNO"; 101 | $entry->fh( $fh ); 102 | } 103 | 104 | { 105 | my $entry = $texts{temp}; 106 | my $filename = $entry->fn(); 107 | my $fh = IO::File->new( $filename, 'w' ) 108 | or die "cannot open $filename: $ERRNO"; 109 | $entry->fh( $fh ); 110 | } 111 | } 112 | 113 | 114 | 115 | sub file_match 116 | { 117 | my ( $orig, @compares ) = @_; 118 | 119 | my $found_match = 0; 120 | 121 | foreach my $file ( @compares ) 122 | { 123 | return 1 124 | if compare( $file, $orig ) == 0; 125 | } 126 | 127 | return 0; 128 | } 129 | 130 | 131 | 132 | 1; 133 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/UserId.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: UserId.t,v 1.1 2001/04/30 01:36:12 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | 8 | use lib './t'; 9 | use MyTest; 10 | use GnuPG::UserId; 11 | 12 | my $v1 = 'Dekan'; 13 | my $v2 = 'Frank Tobin'; 14 | 15 | my $user_id = GnuPG::UserId->new( as_string => $v1 ); 16 | 17 | # deprecation test 18 | TEST 19 | { 20 | $user_id->user_id_string() eq $v1; 21 | }; 22 | 23 | # deprecation test 24 | TEST 25 | { 26 | $user_id->user_id_string( $v2 ); 27 | $user_id->as_string() eq $v2; 28 | }; 29 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/clearsign.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: clearsign.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->clearsign( handles => $handles ); 18 | 19 | print $stdin @{ $texts{plain}->data }; 20 | close $stdin; 21 | waitpid $pid, 0; 22 | 23 | return $CHILD_ERROR == 0; 24 | }; 25 | 26 | 27 | TEST 28 | { 29 | reset_handles(); 30 | 31 | $handles->stdin( $texts{plain}->fh() ); 32 | $handles->options( 'stdin' )->{direct} = 1; 33 | my $pid = $gnupg->clearsign( handles => $handles ); 34 | 35 | waitpid $pid, 0; 36 | 37 | return $CHILD_ERROR == 0; 38 | }; 39 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/decrypt.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: decrypt.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | use File::Compare; 9 | 10 | use lib './t'; 11 | use MyTest; 12 | use MyTestSpecific; 13 | 14 | my $compare; 15 | 16 | TEST 17 | { 18 | reset_handles(); 19 | 20 | my $pid = $gnupg->decrypt( handles => $handles ); 21 | 22 | print $stdin @{ $texts{encrypted}->data() }; 23 | close $stdin; 24 | 25 | $compare = compare( $texts{plain}->fn(), $stdout ); 26 | close $stdout; 27 | waitpid $pid, 0; 28 | 29 | return $CHILD_ERROR == 0;; 30 | }; 31 | 32 | 33 | TEST 34 | { 35 | return $compare == 0; 36 | }; 37 | 38 | 39 | TEST 40 | { 41 | reset_handles(); 42 | 43 | $handles->stdin( $texts{encrypted}->fh() ); 44 | $handles->options( 'stdin' )->{direct} = 1; 45 | 46 | $handles->stdout( $texts{temp}->fh() ); 47 | $handles->options( 'stdout' )->{direct} = 1; 48 | 49 | my $pid = $gnupg->decrypt( handles => $handles ); 50 | 51 | waitpid $pid, 0; 52 | 53 | return $CHILD_ERROR == 0; 54 | }; 55 | 56 | 57 | TEST 58 | { 59 | return compare( $texts{plain}->fn(), $texts{temp}->fn() ) == 0; 60 | }; 61 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/detach_sign.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: detach_sign.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->detach_sign( handles => $handles ); 18 | 19 | print $stdin @{ $texts{plain}->data() }; 20 | close $stdin; 21 | waitpid $pid, 0; 22 | 23 | return $CHILD_ERROR == 0; 24 | }; 25 | 26 | 27 | TEST 28 | { 29 | reset_handles(); 30 | 31 | $handles->stdin( $texts{plain}->fh() ); 32 | $handles->options( 'stdin' )->{direct} = 1; 33 | my $pid = $gnupg->detach_sign( handles => $handles ); 34 | 35 | waitpid $pid, 0; 36 | 37 | return $CHILD_ERROR == 0; 38 | }; 39 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/encrypt.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: encrypt.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | $gnupg->options->clear_recipients(); 18 | $gnupg->options->clear_meta_recipients_keys(); 19 | $gnupg->options->push_recipients( '0x2E854A6B' ); 20 | 21 | my $pid = $gnupg->encrypt( handles => $handles ); 22 | 23 | print $stdin @{ $texts{plain}->data() }; 24 | close $stdin; 25 | waitpid $pid, 0; 26 | 27 | return $CHILD_ERROR == 0; 28 | }; 29 | 30 | 31 | TEST 32 | { 33 | reset_handles(); 34 | 35 | my @keys = $gnupg->get_public_keys( '0xF950DA9C' ); 36 | $gnupg->options->clear_recipients(); 37 | $gnupg->options->clear_meta_recipients_keys(); 38 | $gnupg->options->push_meta_recipients_keys( @keys ); 39 | 40 | my $pid = $gnupg->encrypt( handles => $handles ); 41 | 42 | print $stdin @{ $texts{plain}->data() }; 43 | close $stdin; 44 | waitpid $pid, 0; 45 | 46 | return $CHILD_ERROR == 0; 47 | }; 48 | 49 | 50 | TEST 51 | { 52 | reset_handles(); 53 | 54 | $gnupg->options->clear_recipients(); 55 | $gnupg->options->clear_meta_recipients_keys(); 56 | $gnupg->options->push_recipients( '0x2E854A6B' ); 57 | 58 | $handles->stdin( $texts{plain}->fh() ); 59 | $handles->options( 'stdin' )->{direct} = 1; 60 | my $pid = $gnupg->encrypt( handles => $handles ); 61 | 62 | waitpid $pid, 0; 63 | 64 | return $CHILD_ERROR == 0; 65 | }; 66 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/encrypt_symmetrically.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: encrypt_symmetrically.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->encrypt_symmetrically( handles => $handles ); 18 | 19 | print $stdin @{ $texts{plain}->data() }; 20 | close $stdin; 21 | waitpid $pid, 0; 22 | 23 | return $CHILD_ERROR == 0; 24 | }; 25 | 26 | 27 | 28 | TEST 29 | { 30 | reset_handles(); 31 | 32 | $handles->stdin( $texts{plain}->fh() ); 33 | $handles->options( 'stdin' )->{direct} = 1; 34 | my $pid = $gnupg->encrypt_symmetrically( handles => $handles ); 35 | 36 | waitpid $pid, 0; 37 | 38 | return $CHILD_ERROR == 0; 39 | }; 40 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/export_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: export_keys.t,v 1.6 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->export_keys( handles => $handles, 18 | command_args => '0xF950DA9C' ); 19 | close $stdin; 20 | waitpid $pid, 0; 21 | 22 | return $CHILD_ERROR == 0; 23 | }; 24 | 25 | 26 | TEST 27 | { 28 | reset_handles(); 29 | 30 | $handles->stdout( $texts{temp}->fh() ); 31 | $handles->options( 'stdout' )->{direct} = 1; 32 | 33 | my $pid = $gnupg->export_keys( handles => $handles, 34 | command_args => '0xF950DA9C' ); 35 | waitpid $pid, 0; 36 | return $CHILD_ERROR == 0; 37 | }; 38 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/get_public_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: get_public_keys.t,v 1.9 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | use GnuPG::ComparablePublicKey; 14 | use GnuPG::ComparableSubKey; 15 | 16 | my ( $given_key, $handmade_key ); 17 | 18 | TEST 19 | { 20 | reset_handles(); 21 | 22 | my @returned_keys = $gnupg->get_public_keys_with_sigs( '0xF950DA9C' ); 23 | 24 | return 0 unless @returned_keys == 1; 25 | 26 | $given_key = shift @returned_keys; 27 | 28 | $handmade_key = GnuPG::ComparablePublicKey->new 29 | ( length => 1024, 30 | algo_num => 17, 31 | hex_id => '53AE596EF950DA9C', 32 | creation_date_string => '2000-02-06', 33 | expiration_date_string => '2002-02-05', 34 | owner_trust => 'f', 35 | ); 36 | 37 | $handmade_key->fingerprint 38 | ( GnuPG::Fingerprint->new( as_hex_string => 39 | '93AFC4B1B0288A104996B44253AE596EF950DA9C', 40 | ) 41 | ); 42 | 43 | my $initial_self_signature = GnuPG::Signature->new 44 | ( algo_num => 17, 45 | hex_id => '53AE596EF950DA9C', 46 | date_string => '2000-02-06', 47 | ); 48 | 49 | my $uid2_signature = GnuPG::Signature->new 50 | ( algo_num => 17, 51 | hex_id => '53AE596EF950DA9C', 52 | date_string => '2000-03-16', 53 | ); 54 | 55 | my $ftobin_signature = GnuPG::Signature->new 56 | ( algo_num => 17, 57 | hex_id => '56FFD10A260C4FA3', 58 | date_string => '2000-03-16', 59 | ); 60 | 61 | my $subkey = GnuPG::SubKey->new 62 | ( validity => 'u', 63 | length => 768, 64 | algo_num => 16, 65 | hex_id => 'ADB99D9C2E854A6B', 66 | creation_date_string => '2000-02-06', 67 | expiration_date_string => '2002-02-05', 68 | ); 69 | 70 | $subkey->fingerprint 71 | ( GnuPG::Fingerprint->new( as_hex_string => 72 | '7466B7E98C4CCB64C2CE738BADB99D9C2E854A6B' 73 | ) 74 | ); 75 | 76 | $subkey->signature( $initial_self_signature ); 77 | 78 | $handmade_key->push_subkeys( $subkey ); 79 | 80 | $handmade_key->compare( $given_key ); 81 | }; 82 | 83 | TEST 84 | { 85 | my $subkey1 = $given_key->subkeys()->[0]; 86 | my $subkey2 = $handmade_key->subkeys()->[0]; 87 | 88 | bless $subkey1, 'GnuPG::ComparableSubKey'; 89 | 90 | my $equal = $subkey1->compare( $subkey2 ); 91 | 92 | warn 'subkeys fail comparison; this is a known issue with GnuPG 1.0.1' 93 | if not $equal; 94 | 95 | return $equal; 96 | }; 97 | 98 | 99 | TEST 100 | { 101 | $handmade_key->compare( $given_key, 1 ); 102 | }; 103 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/get_secret_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: get_secret_keys.t,v 1.9 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | use GnuPG::ComparableSecretKey; 14 | 15 | my ( $given_key, $handmade_key ); 16 | 17 | TEST 18 | { 19 | reset_handles(); 20 | 21 | my @returned_keys = $gnupg->get_secret_keys( '0xF950DA9C' ); 22 | 23 | return 0 unless @returned_keys == 1; 24 | 25 | $given_key = shift @returned_keys; 26 | 27 | $handmade_key = GnuPG::ComparableSecretKey->new 28 | ( length => 1024, 29 | algo_num => 17, 30 | hex_id => '53AE596EF950DA9C', 31 | creation_date_string => '2000-02-06', 32 | expiration_date_string => '2002-02-05', 33 | owner_trust => 'f', 34 | ); 35 | 36 | $handmade_key->fingerprint 37 | ( GnuPG::Fingerprint->new( as_hex_string => 38 | '93AFC4B1B0288A104996B44253AE596EF950DA9C', 39 | ) 40 | ); 41 | 42 | my $subkey = GnuPG::SubKey->new 43 | ( validity => 'u', 44 | length => 768, 45 | algo_num => 16, 46 | hex_id => 'ADB99D9C2E854A6B', 47 | creation_date_string => '2000-02-06', 48 | expiration_date_string => '2002-02-05', 49 | ); 50 | 51 | $subkey->fingerprint 52 | ( GnuPG::Fingerprint->new( as_hex_string => 53 | '7466B7E98C4CCB64C2CE738BADB99D9C2E854A6B', 54 | ) 55 | ); 56 | 57 | $handmade_key->push_subkeys( $subkey ); 58 | 59 | $handmade_key->compare( $given_key ); 60 | }; 61 | 62 | 63 | TEST 64 | { 65 | $handmade_key->compare( $given_key, 1 ); 66 | }; 67 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/import_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: import_keys.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->import_keys( handles => $handles ); 18 | 19 | print $stdin @{ $texts{key}->data() }; 20 | close $stdin; 21 | my @output = <$stdout>; 22 | waitpid $pid, 0; 23 | 24 | return $CHILD_ERROR == 0; 25 | }; 26 | 27 | 28 | TEST 29 | { 30 | reset_handles(); 31 | 32 | $handles->stdin( $texts{key}->fh() ); 33 | $handles->options( 'stdin' )->{direct} = 1; 34 | 35 | my $pid = $gnupg->import_keys( handles => $handles ); 36 | waitpid $pid, 0; 37 | 38 | return $CHILD_ERROR == 0; 39 | }; 40 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/list_public_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: list_public_keys.t,v 1.7 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | use IO::File; 9 | 10 | use lib './t'; 11 | use MyTest; 12 | use MyTestSpecific; 13 | 14 | my $outfile; 15 | 16 | TEST 17 | { 18 | reset_handles(); 19 | 20 | my $pid = $gnupg->list_public_keys( handles => $handles ); 21 | close $stdin; 22 | 23 | $outfile = 'test/public-keys/1.out'; 24 | my $out = IO::File->new( "> $outfile" ) 25 | or die "cannot open $outfile for writing: $ERRNO"; 26 | $out->print( <$stdout> ); 27 | close $stdout; 28 | $out->close(); 29 | 30 | waitpid $pid, 0; 31 | 32 | return $CHILD_ERROR == 0; 33 | }; 34 | 35 | 36 | TEST 37 | { 38 | reset_handles(); 39 | 40 | my $pid = $gnupg->list_public_keys( handles => $handles, 41 | ommand_args => '0xF950DA9C' 42 | ); 43 | close $stdin; 44 | 45 | $outfile = 'test/public-keys/2.out'; 46 | my $out = IO::File->new( "> $outfile" ) 47 | or die "cannot open $outfile for writing: $ERRNO"; 48 | $out->print( <$stdout> ); 49 | close $stdout; 50 | $out->close(); 51 | 52 | waitpid $pid, 0; 53 | 54 | return $CHILD_ERROR == 0; 55 | }; 56 | 57 | 58 | 59 | TEST 60 | { 61 | reset_handles(); 62 | 63 | $handles->stdout( $texts{temp}->fh() ); 64 | $handles->options( 'stdout' )->{direct} = 1; 65 | 66 | my $pid = $gnupg->list_public_keys( handles => $handles, 67 | command_args => '0xF950DA9C', 68 | ); 69 | 70 | waitpid $pid, 0; 71 | 72 | $outfile = $texts{temp}->fn(); 73 | 74 | return $CHILD_ERROR == 0; 75 | }; 76 | 77 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/list_secret_keys.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: list_secret_keys.t,v 1.7 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | my $outfile; 14 | 15 | TEST 16 | { 17 | reset_handles(); 18 | 19 | my $pid = $gnupg->list_secret_keys( handles => $handles ); 20 | close $stdin; 21 | 22 | $outfile = 'test/secret-keys/1.out'; 23 | my $out = IO::File->new( "> $outfile" ) 24 | or die "cannot open $outfile for writing: $ERRNO"; 25 | $out->print( <$stdout> ); 26 | close $stdout; 27 | $out->close(); 28 | waitpid $pid, 0; 29 | 30 | return $CHILD_ERROR == 0; 31 | }; 32 | 33 | 34 | TEST 35 | { 36 | my @files_to_test = ( 'test/secret-keys/1.0.test' ); 37 | 38 | return file_match( $outfile, @files_to_test ); 39 | }; 40 | 41 | 42 | TEST 43 | { 44 | reset_handles(); 45 | 46 | my $pid = $gnupg->list_secret_keys( handles => $handles, 47 | command_args => '0xF950DA9C' ); 48 | close $stdin; 49 | 50 | $outfile = 'test/secret-keys/2.out'; 51 | my $out = IO::File->new( "> $outfile" ) 52 | or die "cannot open $outfile for writing: $ERRNO"; 53 | $out->print( <$stdout> ); 54 | close $stdout; 55 | $out->close(); 56 | 57 | waitpid $pid, 0; 58 | 59 | return $CHILD_ERROR == 0; 60 | 61 | }; 62 | 63 | 64 | TEST 65 | { 66 | reset_handles(); 67 | 68 | $handles->stdout( $texts{temp}->fh() ); 69 | $handles->options( 'stdout' )->{direct} = 1; 70 | 71 | my $pid = $gnupg->list_secret_keys( handles => $handles, 72 | command_args => '0xF950DA9C' ); 73 | 74 | waitpid $pid, 0; 75 | 76 | $outfile = $texts{temp}->fn(); 77 | 78 | return $CHILD_ERROR == 0; 79 | }; 80 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/list_sigs.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: list_sigs.t,v 1.7 2001/05/03 06:00:06 ftobin Exp $ 4 | 5 | use strict; 6 | use English qw( -no_match_vars ); 7 | 8 | use lib './t'; 9 | use MyTest; 10 | use MyTestSpecific; 11 | 12 | my $outfile; 13 | 14 | TEST 15 | { 16 | reset_handles(); 17 | 18 | my $pid = $gnupg->list_sigs( handles => $handles ); 19 | close $stdin; 20 | 21 | $outfile = 'test/public-keys-sigs/1.out'; 22 | my $out = IO::File->new( "> $outfile" ) 23 | or die "cannot open $outfile for writing: $ERRNO"; 24 | $out->print( <$stdout> ); 25 | close $stdout; 26 | $out->close(); 27 | 28 | waitpid $pid, 0; 29 | 30 | return $CHILD_ERROR == 0; 31 | }; 32 | 33 | 34 | TEST 35 | { 36 | reset_handles(); 37 | 38 | my $pid = $gnupg->list_sigs( handles => $handles, 39 | command_args => '0xF950DA9C', 40 | ); 41 | close $stdin; 42 | 43 | $outfile = 'test/public-keys-sigs/2.out'; 44 | my $out = IO::File->new( "> $outfile" ) 45 | or die "cannot open $outfile for writing: $ERRNO"; 46 | $out->print( <$stdout> ); 47 | close $stdout; 48 | $out->close(); 49 | waitpid $pid, 0; 50 | 51 | return $CHILD_ERROR == 0; 52 | }; 53 | 54 | 55 | TEST 56 | { 57 | reset_handles(); 58 | 59 | $handles->stdout( $texts{temp}->fh() ); 60 | $handles->options( 'stdout' )->{direct} = 1; 61 | 62 | my $pid = $gnupg->list_sigs( handles => $handles, 63 | command_args => '0xF950DA9C', 64 | ); 65 | 66 | waitpid $pid, 0; 67 | 68 | $outfile = $texts{temp}->fn(); 69 | 70 | return $CHILD_ERROR == 0; 71 | }; 72 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/passphrase_handling.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: passphrase_handling.t,v 1.6 2001/05/03 06:02:39 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | use Symbol; 9 | use IO::File; 10 | 11 | use lib './t'; 12 | use MyTest; 13 | use MyTestSpecific; 14 | 15 | TEST 16 | { 17 | reset_handles(); 18 | return $gnupg->test_default_key_passphrase() 19 | }; 20 | 21 | 22 | $gnupg->clear_passphrase(); 23 | 24 | TEST 25 | { 26 | reset_handles(); 27 | 28 | my $passphrase_handle = gensym; 29 | $handles->passphrase( $passphrase_handle ); 30 | 31 | my $pid = $gnupg->sign( handles => $handles ); 32 | 33 | print $passphrase_handle 'test'; 34 | print $stdin @{ $texts{plain}->data() }; 35 | 36 | close $passphrase_handle; 37 | close $stdin; 38 | 39 | waitpid $pid, 0; 40 | return $CHILD_ERROR == 0; 41 | }; 42 | 43 | 44 | 45 | TEST 46 | { 47 | reset_handles(); 48 | $handles->clear_stderr(); 49 | $handles->stderr( '>&STDERR' ); 50 | 51 | my $pass_fn = 'test/passphrase'; 52 | my $passfile = IO::File->new( $pass_fn ) 53 | or die "cannot open $pass_fn: $ERRNO"; 54 | $handles->passphrase( $passfile ); 55 | $handles->options( 'passphrase' )->{direct} = 1; 56 | 57 | my $pid = $gnupg->sign( handles => $handles ); 58 | close $stdin; 59 | 60 | waitpid $pid, 0; 61 | return $CHILD_ERROR == 0; 62 | }; 63 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/sign.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: sign.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->sign( handles => $handles ); 18 | 19 | print $stdin @{ $texts{plain}->data() }; 20 | close $stdin; 21 | waitpid $pid, 0; 22 | 23 | return $CHILD_ERROR == 0; 24 | }; 25 | 26 | 27 | TEST 28 | { 29 | reset_handles(); 30 | 31 | $handles->stdin( $texts{plain}->fh() ); 32 | $handles->options( 'stdin' )->{direct} = 1; 33 | my $pid = $gnupg->sign( handles => $handles ); 34 | 35 | waitpid $pid, 0; 36 | 37 | return $CHILD_ERROR == 0; 38 | }; 39 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/sign_and_encrypt.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: sign_and_encrypt.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | $gnupg->options->push_recipients( '0x2E854A6B' ); 18 | my $pid = $gnupg->sign_and_encrypt( handles => $handles ); 19 | 20 | print $stdin @{ $texts{plain}->data() }; 21 | close $stdin; 22 | waitpid $pid, 0; 23 | 24 | return $CHILD_ERROR == 0; 25 | }; 26 | 27 | 28 | TEST 29 | { 30 | reset_handles(); 31 | 32 | $handles->stdin( $texts{plain}->fh() ); 33 | $handles->options( 'stdin' )->{direct} = 1; 34 | my $pid = $gnupg->sign_and_encrypt( handles => $handles ); 35 | 36 | waitpid $pid, 0; 37 | 38 | return $CHILD_ERROR == 0; 39 | }; 40 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/verify.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: verify.t,v 1.4 2001/05/03 06:00:06 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | use English qw( -no_match_vars ); 8 | 9 | use lib './t'; 10 | use MyTest; 11 | use MyTestSpecific; 12 | 13 | TEST 14 | { 15 | reset_handles(); 16 | 17 | my $pid = $gnupg->verify( handles => $handles ); 18 | 19 | print $stdin @{ $texts{signed}->data() }; 20 | close $stdin; 21 | waitpid $pid, 0; 22 | 23 | return $CHILD_ERROR == 0; 24 | }; 25 | 26 | 27 | TEST 28 | { 29 | reset_handles(); 30 | 31 | $handles->stdin( $texts{signed}->fh() ); 32 | $handles->options( 'stdin' )->{direct} = 1; 33 | 34 | my $pid = $gnupg->verify( handles => $handles ); 35 | 36 | waitpid $pid, 0; 37 | 38 | return $CHILD_ERROR == 0; 39 | }; 40 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/t/wrap_call.t: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | # 3 | # $Id: wrap_call.t,v 1.1 2001/05/03 07:32:34 ftobin Exp $ 4 | # 5 | 6 | use strict; 7 | 8 | use lib './t'; 9 | use MyTest; 10 | use MyTestSpecific; 11 | 12 | TEST 13 | { 14 | reset_handles(); 15 | 16 | my $pid = $gnupg->wrap_call 17 | ( commands => [ qw( --list-packets ) ], 18 | command_args => [ qw( test/key.1.asc ) ], 19 | handles => $handles, 20 | ); 21 | 22 | close $stdin; 23 | 24 | my @out = <$stdout>; 25 | waitpid $pid, 0; 26 | 27 | return @out > 0; #just check if we have output. 28 | }; 29 | 30 | TEST 31 | { 32 | return $CHILD_ERROR == 0; 33 | }; 34 | 35 | 36 | # same as above, but now with deprecated stuff 37 | TEST 38 | { 39 | reset_handles(); 40 | 41 | my $pid = $gnupg->wrap_call 42 | ( gnupg_commands => [ qw( --list-packets ) ], 43 | gnupg_command_args => [ qw( test/key.1.asc ) ], 44 | handles => $handles, 45 | ); 46 | 47 | close $stdin; 48 | 49 | my @out = <$stdout>; 50 | waitpid $pid, 0; 51 | 52 | return @out > 0; #just check if we have output. 53 | }; 54 | 55 | 56 | TEST 57 | { 58 | return $CHILD_ERROR == 0; 59 | }; 60 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/encrypted.1.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | Version: GnuPG v1.0.1 (FreeBSD) 3 | Comment: For info see http://www.gnupg.org 4 | 5 | hM4DrbmdnC6FSmsQAv48WgPo026qT5y6VRoeV+fA/c2XAj+cPuKXa19ntGLx1oAk 6 | Cj1Zd7m68gsnG9OOglat013s2ADkhLaR4FURcCjT57XZNvDacJK4oSTl91w12ClU 7 | TptmVoovBQhVNgyDmu8C/js3bgmSlkbZJIWh1NUbOYkV9ugP9i+ryYl9QIcjbWGq 8 | 9D/tgNJri0/k/L2+HywSktjMJI0KAF+L7RcMCQdzfQ2ffkm4ZWlRXGbGW4p7GBON 9 | JazfmBp1bKYw90D0Xwv5PMmHVh3T1sSWpZpeD5CHtqHWhWFFLi3qrh+A7VggATXz 10 | s9JU5FtKoLkpd+O3uFaNYbnCBjex5PwO+RFLEPJs5+gUEyNXsZlnIt+tLa3aRxzV 11 | brkdspHcgTZG7z00ZMRC4nLVuNLfflvPWrGSIIWHP+424dFPKdClabJ0bAxAp5B5 12 | rDQKx0ef6AI+ 13 | =EQaf 14 | -----END PGP MESSAGE----- 15 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/key.1.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG v1.0.1h (FreeBSD) 3 | Comment: For info see http://www.gnupg.org 4 | 5 | mQGiBDic/2URBACI/KqlvNzVIITUYUP0TtFxWjOXlGQRWN4DqiCSr9MXTj3KLLff 6 | Ldxv7ffDYg9ai9rQZxPmFT+HSN12y5cwXzDLqPiAHbR/rBHu1yX1VnLLm9rWKReK 7 | Z3y7CJs+iuDZqa13QWl6NfKGjGLSVnCZSpLYEEgBc9wkJj7qDxA6Q8C2SwCgjyo4 8 | QscP8XZgy7eMePyT9TSrmhcEAIPjSMKqZfVt6E6P3ObaewmRscdeyMpEb6hYaaQz 9 | UJB7/za+USOF6OfglVeLshOMBOMYSVhzIYKG3iuMhvNupnATVDSWeseY66KFgfcJ 10 | 8Ma2lutRLT5WHjgaBuS1I5vMZVAV+akmx05LhZsm6tYE8gilVlEadqQO3NnDjmvY 11 | LMy0BACA3gTIXjDJ1iwT+Qz/knqEpaWdCQCzUz1NYZP++MXa75/4p9X3ayRPvBdk 12 | T1DVJOCxnNOktfwteNrso/5Y+hwaZObHuWxO5hgXNUMWOnLvlU39WT6ENCaZCW6c 13 | p2V4rB3j2JO8zQv0cM72Jfr4FqD1A+91wYxhc+NchnWvkZ5XBLQqR251UEcgdGVz 14 | dCBrZXkgKGZvciB0ZXN0aW5nIHB1cnBvc2VzIG9ubHkpiFwEExECABwFAjic/2UF 15 | CQPCZwAECwoEAwMVAwIDFgIBAheAAAoJEFOuWW75UNqclaUAn0S5f03veSfWimJ5 16 | RiAJ2mn6Asc+AJ0SGcRri5Yxe1HD/R4GL94lgD7Wh4hGBBARAgAGBQI40F/BAAoJ 17 | EFb/0QomDE+j6LQAn3YAtCYIJa0+ynAo93ZoOU+2yasbAJ4h+XmjW1hU/847vEaC 18 | OhUqDa6e2rQLRm9vIEJhciAoMSmIXAQTEQIAHAUCONBe8wUJA8JnAAQLCgQDAxUD 19 | AgMWAgECF4AACgkQU65ZbvlQ2pz5BwCdET0gdTXPSiXmIu574Tad0crbDkoAn37Y 20 | JkfJ3QpAY/ukLbDWwFUtFQw5iEYEEBECAAYFAjjQX8cACgkQVv/RCiYMT6NuLwCf 21 | dORipe3h0q7gme02CobFbKRLjcYAnRT0kAgd4oJJ1gahEdxZt7wJEDv6uM0EOJz/ 22 | fxADAIgxmC2txMXQXLsB2er2EhMd3JwkzqckZVdnlCP7C6QvdNENjn9VZPak+4g3 23 | +NxKRlccGbEi5t9LRD0VGXpqImiIY9BoX6225AIxbaqbVg0fkVR1NkWApn5t8Kcn 24 | d4pc8wADBgL+LzhQ/xMMasmqCWJyDoZTlib6qbZ7M6dN/A3oQ/8+kOQ+Lzee4Bgt 25 | kU+lOczPXIOiDbOnxF42W4oqCS55mj3/StgnTrl3uq9bGvsqy41vkkVPAWgvVVVl 26 | 5z5WeTxG73w+iEwEGBECAAwFAjic/38FCQPCZwAACgkQU65ZbvlQ2pxQagCeLShZ 27 | NrESCT3im8kmmdh4yneEddAAn0Yug2I+wLDO58866cQugR1qhrfd 28 | =/tKz 29 | -----END PGP PUBLIC KEY BLOCK----- 30 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/options: -------------------------------------------------------------------------------- 1 | no-secmem-warning 2 | armor 3 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/passphrase: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/plain.1.txt: -------------------------------------------------------------------------------- 1 | "To learn what is good and what is to be valued, 2 | those truths which cannot be shaken or changed." 3 | Myst: The Book of Atrus 4 | 5 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys-sigs/1.0.test: -------------------------------------------------------------------------------- 1 | test/pubring.gpg 2 | ---------------- 3 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 4 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 5 | sig 260C4FA3 2000-03-16 Frank J. Tobin 6 | uid Foo Bar (1) 7 | sig F950DA9C 2000-03-16 GnuPG test key (for testing purposes only) 8 | sig 260C4FA3 2000-03-16 Frank J. Tobin 9 | sub 768g/2E854A6B 2000-02-06 10 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 11 | 12 | pub 1024D/260C4FA3 1999-04-22 Frank J. Tobin 13 | sig 260C4FA3 1999-04-22 Frank J. Tobin 14 | sig F40EB65E 1999-04-22 [User id not found] 15 | sig 164BDBAE 1999-11-16 [User id not found] 16 | uid Dekan 17 | sig 260C4FA3 1999-04-22 Frank J. Tobin 18 | sig F40EB65E 1999-04-22 [User id not found] 19 | sig 164BDBAE 1999-11-16 [User id not found] 20 | uid Frank J. Tobin 21 | sig 260C4FA3 1999-06-29 Frank J. Tobin 22 | sig 164BDBAE 1999-11-16 [User id not found] 23 | uid Frank J. Tobin 24 | sig 260C4FA3 1999-07-02 Frank J. Tobin 25 | sig 164BDBAE 1999-11-16 [User id not found] 26 | sub 2048g/334C9F14 1999-04-22 27 | sig 260C4FA3 1999-04-22 Frank J. Tobin 28 | 29 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys-sigs/1.1.test: -------------------------------------------------------------------------------- 1 | test/pubring.gpg 2 | ---------------- 3 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 4 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 5 | sig 260C4FA3 2000-03-16 Frank J. Tobin 6 | uid Foo Bar (1) 7 | sig F950DA9C 2000-03-16 GnuPG test key (for testing purposes only) 8 | sig 260C4FA3 2000-03-16 Frank J. Tobin 9 | sub 768g/2E854A6B 2000-02-06 [expires: 2002-02-05] 10 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 11 | 12 | pub 1024D/260C4FA3 1999-04-22 Frank J. Tobin 13 | sig 260C4FA3 1999-04-22 Frank J. Tobin 14 | sig F40EB65E 1999-04-22 [User id not found] 15 | sig 164BDBAE 1999-11-16 [User id not found] 16 | uid Dekan 17 | sig 260C4FA3 1999-04-22 Frank J. Tobin 18 | sig F40EB65E 1999-04-22 [User id not found] 19 | sig 164BDBAE 1999-11-16 [User id not found] 20 | uid Frank J. Tobin 21 | sig 260C4FA3 1999-06-29 Frank J. Tobin 22 | sig 164BDBAE 1999-11-16 [User id not found] 23 | uid Frank J. Tobin 24 | sig 260C4FA3 1999-07-02 Frank J. Tobin 25 | sig 164BDBAE 1999-11-16 [User id not found] 26 | sub 2048g/334C9F14 1999-04-22 [expires: 2001-04-21] 27 | sig 260C4FA3 1999-04-22 Frank J. Tobin 28 | 29 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys-sigs/2.0.test: -------------------------------------------------------------------------------- 1 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 2 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 3 | sig 260C4FA3 2000-03-16 Frank J. Tobin 4 | uid Foo Bar (1) 5 | sig F950DA9C 2000-03-16 GnuPG test key (for testing purposes only) 6 | sig 260C4FA3 2000-03-16 Frank J. Tobin 7 | sub 768g/2E854A6B 2000-02-06 8 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 9 | 10 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys-sigs/2.1.test: -------------------------------------------------------------------------------- 1 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 2 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 3 | sig 260C4FA3 2000-03-16 Frank J. Tobin 4 | uid Foo Bar (1) 5 | sig F950DA9C 2000-03-16 GnuPG test key (for testing purposes only) 6 | sig 260C4FA3 2000-03-16 Frank J. Tobin 7 | sub 768g/2E854A6B 2000-02-06 [expires: 2002-02-05] 8 | sig F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 9 | 10 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys/1.0.test: -------------------------------------------------------------------------------- 1 | test/pubring.gpg 2 | ---------------- 3 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 4 | uid Foo Bar (1) 5 | sub 768g/2E854A6B 2000-02-06 6 | 7 | pub 1024D/260C4FA3 1999-04-22 Frank J. Tobin 8 | uid Dekan 9 | uid Frank J. Tobin 10 | uid Frank J. Tobin 11 | sub 2048g/334C9F14 1999-04-22 12 | 13 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys/1.1.test: -------------------------------------------------------------------------------- 1 | test/pubring.gpg 2 | ---------------- 3 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 4 | uid Foo Bar (1) 5 | sub 768g/2E854A6B 2000-02-06 [expires: 2002-02-05] 6 | 7 | pub 1024D/260C4FA3 1999-04-22 Frank J. Tobin 8 | uid Dekan 9 | uid Frank J. Tobin 10 | uid Frank J. Tobin 11 | sub 2048g/334C9F14 1999-04-22 [expires: 2001-04-21] 12 | 13 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys/2.0.test: -------------------------------------------------------------------------------- 1 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 2 | uid Foo Bar (1) 3 | sub 768g/2E854A6B 2000-02-06 4 | 5 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/public-keys/2.1.test: -------------------------------------------------------------------------------- 1 | pub 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 2 | uid Foo Bar (1) 3 | sub 768g/2E854A6B 2000-02-06 [expires: 2002-02-05] 4 | 5 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/pubring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/deps/GnuPG-Interface/test/pubring.gpg -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/secret-keys/1.0.test: -------------------------------------------------------------------------------- 1 | test/secring.gpg 2 | ---------------- 3 | sec 1024D/F950DA9C 2000-02-06 4 | uid GnuPG test key (for testing purposes only) 5 | uid Foo Bar (1) 6 | ssb 768g/2E854A6B 2000-02-06 7 | 8 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/secret-keys/2.0.test: -------------------------------------------------------------------------------- 1 | sec 1024D/F950DA9C 2000-02-06 GnuPG test key (for testing purposes only) 2 | uid Foo Bar (1) 3 | ssb 768g/2E854A6B 2000-02-06 4 | 5 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/secring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/deps/GnuPG-Interface/test/secring.gpg -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/signed.1: -------------------------------------------------------------------------------- 1 | "To learn what is good and what is to be valued, 2 | those truths which cannot be shaken or changed." 3 | Myst: The Book of Atrus 4 | 5 | -------------------------------------------------------------------------------- /deps/GnuPG-Interface/test/signed.1.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP MESSAGE----- 2 | Version: GnuPG v1.0.1 (FreeBSD) 3 | Comment: For info see http://www.gnupg.org 4 | 5 | owGbwMvMwCQYvC4y72fArTmMp5uSGCzmCs1VCslXyElNLMpTKM9ILFHILFZIz89P 6 | UUjMS4ELlOQrJKUqlCXmlKam6HCVZOQXpyqUFJWWZBQDlWQmZygkJ+bl5ZeAFBVn 7 | JGan5inkFykkZyTmpaem6ClxcfpWFpdYKYRkpCo45ednK+SnKTgCtRdzcXW4sTAI 8 | MjGwsTKBXMLAxSkAcx5fDcM8rfgEBbsFNf+qm4L2br7wUzz0/V5Rhnk6tiKB9bkN 9 | M1atrOP7sUc4sO6z+goA 10 | =qwXx 11 | -----END PGP MESSAGE----- 12 | -------------------------------------------------------------------------------- /deps/README: -------------------------------------------------------------------------------- 1 | This directory contains perl modules and other dependencies used by gpgdir. 2 | These dependencies are included in this directory to ease the installation 3 | process, but if gpgdir is being installed on a system where all necessary 4 | dependencies are already installed then it is recommended to install from one 5 | of the gpgdir "nodeps" tarballs or RPM's. These distributions of gpgdir do 6 | not include any perl modules or other dependencies: 7 | 8 | http://www.cipherdyne.org/gpgdir/download/ 9 | -------------------------------------------------------------------------------- /deps/TermReadKey/MANIFEST: -------------------------------------------------------------------------------- 1 | Configure.pm 2 | MANIFEST 3 | Makefile.PL 4 | README 5 | ReadKey.pm 6 | ReadKey.xs 7 | genchars.pl 8 | ppport.h 9 | test.pl 10 | META.yml Module meta-data (added by MakeMaker) 11 | -------------------------------------------------------------------------------- /deps/TermReadKey/META.yml: -------------------------------------------------------------------------------- 1 | #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# 2 | name: TermReadKey 3 | version: 2.30 4 | version_from: ReadKey.pm 5 | installdirs: site 6 | requires: 7 | 8 | distribution_type: module 9 | generated_by: ExtUtils::MakeMaker version 6.13 10 | -------------------------------------------------------------------------------- /deps/TermReadKey/Makefile.PL: -------------------------------------------------------------------------------- 1 | # Term::ReadKey Makefile.PL Version 2.18 2 | # $Id$ 3 | 4 | use ExtUtils::MakeMaker; 5 | use Carp; 6 | 7 | my $mm_version = $ExtUtils::MakeMaker::VERSION || $ExtUtils::MakeMaker::Version; 8 | if( $mm_version < 3.5 ) { 9 | croak("Sorry, but MakeMaker 3.5 or better is needed to build this package."); 10 | } 11 | 12 | &WriteMakefile( 13 | NAME => 'Term::ReadKey', 14 | DISTNAME => 'TermReadKey', 15 | VERSION_FROM => 'ReadKey.pm', 16 | XSPROTOARG => '-noprototypes', 17 | PM => { "ReadKey.pm" => '$(INST_LIBDIR)/ReadKey.pm'}, 18 | 19 | 'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" }, 20 | 21 | # Uncomment these to allow testing of sgtty under Linux. Not needed normally. 22 | # INC => "-I/usr/include/bsd", 23 | # LIBS => "-lbsd" 24 | ); 25 | 26 | sub MY::realclean { 27 | my $self = shift; 28 | $_ = $self->MM::realclean(); 29 | s/\t/\trm -f cchars.h\n\t/; 30 | $_; 31 | } 32 | 33 | sub MY::top_targets { 34 | my $self = shift; 35 | $_ = $self->MM::top_targets(); 36 | $_ .= " 37 | 38 | sgtty cchars.h: genchars.pl 39 | \$(PERL) -I\$(PERL_LIB) genchars.pl 40 | 41 | distcc: genchars.pl 42 | \$(PERL) -I\$(PERL_LIB) genchars.pl dist 43 | 44 | ReadKey.c: cchars.h 45 | 46 | "; 47 | $_; 48 | 49 | } 50 | 51 | sub MY::test { 52 | my $self = shift; 53 | $_ = $self->MM::test(); 54 | s/test.pl/-w test.pl/; 55 | $_; 56 | } 57 | 58 | sub MY::test_interactive 59 | { 60 | return "Fooo"; 61 | } 62 | -------------------------------------------------------------------------------- /deps/TermReadKey/VERSION: -------------------------------------------------------------------------------- 1 | 2.30 2 | -------------------------------------------------------------------------------- /packaging/gpgdir-nodeps.spec: -------------------------------------------------------------------------------- 1 | %define name gpgdir 2 | %define version 1.9.6 3 | %define release 1 4 | %define gpgdirlibdir %_libdir/%name 5 | 6 | Summary: Gpgdir recursively encrypts/decrypts directories with GnuPG. 7 | Name: %name 8 | Version: %version 9 | Release: %release 10 | License: GPL 11 | Group: Applications/Cryptography 12 | Url: http://www.cipherdyne.org/gpgdir/ 13 | Source: %name-%version.tar.gz 14 | BuildRoot: %_tmppath/%{name}-buildroot 15 | #Prereq: rpm-helper 16 | 17 | %description 18 | gpgdir is a perl script that uses the CPAN GnuPG::Interface perl module to encrypt 19 | and decrypt directories using a gpg key specified in ~/.gpgdirrc. gpgdir recursively 20 | descends through a directory in order to make sure it encrypts or decrypts every file 21 | in a directory and all of its subdirectories. By default the mtime and atime values 22 | of all files will be preserved upon encryption and decryption (this can be disabled 23 | with the --no-preserve-times option). Note that in --encrypt mode, gpgdir will 24 | delete the original files that it successfully encrypts (unless the --no-delete 25 | option is given). However, upon startup gpgdir first asks for a the decryption pass- 26 | word to be sure that a dummy file can successfully be encrypted and decrypted. The 27 | initial test can be disabled with the --skip-test option so that a directory can eas- 28 | ily be encrypted without having to also specify a password (this is consistent with 29 | gpg behavior). Also, note that gpgdir is careful not encrypt hidden files and direc- 30 | tories. After all, you probably don't want your ~/.gnupg directory or ~/.bashrc file 31 | to be encrypted. 32 | 33 | %prep 34 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 35 | 36 | %setup -q 37 | 38 | %build 39 | 40 | %install 41 | 42 | install -m 755 gpgdir $RPM_BUILD_ROOT%_bindir/ 43 | install -m 644 gpgdir.1 $RPM_BUILD_ROOT%{_mandir}/man1/ 44 | 45 | %clean 46 | [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 47 | 48 | %pre 49 | 50 | %post 51 | 52 | %preun 53 | 54 | %files 55 | %defattr(-,root,root) 56 | %_bindir/* 57 | %{_mandir}/man1/* 58 | %_libdir/%name 59 | 60 | %changelog 61 | * Mon Jan 05 2015 Michael Rash 62 | - gpgdir-1.9.6 release 63 | 64 | * Sat Sep 05 2009 Michael Rash 65 | - gpgdir-1.9.5 release 66 | 67 | * Thu Feb 12 2009 Michael Rash 68 | - gpgdir-1.9.4 release 69 | 70 | * Wed Nov 11 2008 Michael Rash 71 | - gpgdir-1.9.3 release 72 | 73 | * Sun Aug 31 2008 Michael Rash 74 | - This spec file omits installing any perl module dependencies. 75 | - gpgdir-1.9.2 release 76 | 77 | * Sat Jun 07 2008 Michael Rash 78 | - gpgdir-1.9.1 release 79 | 80 | * Sat May 31 2008 Michael Rash 81 | - gpgdir-1.9 release 82 | 83 | * Mon Feb 18 2008 Michael Rash 84 | - gpgdir-1.8 release 85 | 86 | * Mon Feb 18 2008 Michael Rash 87 | - gpgdir-1.7 release 88 | 89 | * Sun Feb 17 2008 Michael Rash 90 | - gpgdir-1.6 release 91 | 92 | * Fri Aug 31 2007 Michael Rash 93 | - gpgdir-1.5 release 94 | 95 | * Sat Jul 20 2007 Michael Rash 96 | - gpgdir-1.4 release 97 | 98 | * Sat Jun 09 2007 Michael Rash 99 | - gpgdir-1.3 release 100 | 101 | * Mon May 28 2007 Michael Rash 102 | - gpgdir-1.2 release 103 | 104 | * Mon May 21 2007 Michael Rash 105 | - gpgdir-1.1 release 106 | 107 | * Sun Sep 17 2006 Michael Rash 108 | - gpgdir-1.0.3 release (1.0.2 was skipped accidentally). 109 | 110 | * Sat Sep 16 2006 Michael Rash 111 | - Added x86_64 RPM. 112 | - Removed iptables as a prerequisite. 113 | - gpgdir-1.0.1 release 114 | 115 | * Wed Sep 13 2006 Michael Rash 116 | - gpgdir-1.0 release 117 | 118 | * Thu Sep 09 2006 Michael Rash 119 | - Initial RPM release of gpgdir-0.9.9 120 | -------------------------------------------------------------------------------- /packaging/gpgdir.SlackBuild: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ################################################################################ 3 | # gpgdir.SlackBuild -- pyllyukko@maimed.org -- 26.1.2007 (originally for psad) # 4 | ################################################################################ 5 | declare -r RPM_BUILDER="http://www.cipherdyne.org/scripts/cd_rpmbuilder.tar.gz" 6 | declare -r RPM_ROOT_DIR="/usr/src/rpm" 7 | declare -r ARCH="i386" 8 | declare -ri BUILD=1 9 | GPGDIR_VERSION=`wget --no-verbose --output-document=- http://www.cipherdyne.org/gpgdir/gpgdir-latest` || { 10 | echo "error!" 1>&2 11 | exit 1 12 | } 13 | ################################################################################ 14 | wget --no-verbose --output-document=- "${RPM_BUILDER}" | tar xz --to-stdout | perl -- - -p gpgdir -r "${RPM_ROOT_DIR}" 15 | [ $[ ${PIPESTATUS[0]} | ${PIPESTATUS[1]} | ${PIPESTATUS[2]} ] -ne 0 ] && { 16 | echo "error!" 1>&2 17 | exit 1 18 | } 19 | [ ! -f "${RPM_ROOT_DIR}/RPMS/${ARCH}/gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm" ] && { 20 | echo "error: file \`gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm' doesn't exist!" 1>&2 21 | exit 1 22 | } 23 | pushd "${RPM_ROOT_DIR}/RPMS/${ARCH}" || exit 1 24 | rpm2tgz "gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.rpm" || exit 1 25 | mv -v "gpgdir-${GPGDIR_VERSION}-${BUILD}.${ARCH}.tgz" "gpgdir-${GPGDIR_VERSION}-${ARCH}-${BUILD}.tgz" || exit 1 26 | ls -l "${RPM_ROOT_DIR}/RPMS/${ARCH}/gpgdir-${GPGDIR_VERSION}-${ARCH}-${BUILD}.tgz" 27 | exit ${?} 28 | -------------------------------------------------------------------------------- /test/conf/broken.pw: -------------------------------------------------------------------------------- 1 | boguspassword 2 | -------------------------------------------------------------------------------- /test/conf/test-gpg/pubring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/conf/test-gpg/pubring.gpg -------------------------------------------------------------------------------- /test/conf/test-gpg/secring.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/conf/test-gpg/secring.gpg -------------------------------------------------------------------------------- /test/conf/test-gpg/trustdb.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/conf/test-gpg/trustdb.gpg -------------------------------------------------------------------------------- /test/conf/test.pw: -------------------------------------------------------------------------------- 1 | gpgdirtest 2 | -------------------------------------------------------------------------------- /test/data-dir/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/.hidden -------------------------------------------------------------------------------- /test/data-dir/0: -------------------------------------------------------------------------------- 1 | file named zero 2 | -------------------------------------------------------------------------------- /test/data-dir/dir2/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir2/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir2/dir4/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir2/dir4/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir2/dir4/somefile: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | but there is no file extension on this one. 3 | 4 | gppdir should encrypt this file under the test suite. 5 | 6 | This file is in the top-level data-dir directory. 7 | -------------------------------------------------------------------------------- /test/data-dir/dir2/dir4/somefile.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/dir2/new-ascii: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | but there is no file extension on this one. 3 | 4 | gppdir should encrypt this file under the test suite. 5 | 6 | This file is in the top-level data-dir directory. 7 | -------------------------------------------------------------------------------- /test/data-dir/dir2/new-ascii.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/dir3/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir3/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir3/dir4/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir3/dir4/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir3/dir4/random-binary-data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir3/dir4/random-binary-data -------------------------------------------------------------------------------- /test/data-dir/dir3/dir4/random-binary-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir3/dir4/random-binary-data.bin -------------------------------------------------------------------------------- /test/data-dir/dir3/file1: -------------------------------------------------------------------------------- 1 | some lines 2 | -------------------------------------------------------------------------------- /test/data-dir/dir3/file2: -------------------------------------------------------------------------------- 1 | more lines 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir2/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/dir4/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir2/dir4/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/dir4/somefile: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | but there is no file extension on this one. 3 | 4 | gppdir should encrypt this file under the test suite. 5 | 6 | This file is in the top-level data-dir directory. 7 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/dir4/somefile.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/new-ascii: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | but there is no file extension on this one. 3 | 4 | gppdir should encrypt this file under the test suite. 5 | 6 | This file is in the top-level data-dir directory. 7 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir2/new-ascii.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir3/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/dir4/.hidden: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir3/dir4/.hidden -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/dir4/blah: -------------------------------------------------------------------------------- 1 | fdsafdsa 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/dir4/random-binary-data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir3/dir4/random-binary-data -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/dir4/random-binary-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/dir_no_top_level_files/dir3/dir4/random-binary-data.bin -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/dir4/somefile.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/file1: -------------------------------------------------------------------------------- 1 | some lines 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/dir3/file2: -------------------------------------------------------------------------------- 1 | more lines 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/files_with_spaces/dir space/one_file: -------------------------------------------------------------------------------- 1 | somedata 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/files_with_spaces/dir2 space/file1: -------------------------------------------------------------------------------- 1 | this is a multi- 2 | line file 3 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/files_with_spaces/file1 space1: -------------------------------------------------------------------------------- 1 | one space in filename 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/files_with_spaces/file3 -dash: -------------------------------------------------------------------------------- 1 | space and dash 2 | -------------------------------------------------------------------------------- /test/data-dir/dir_no_top_level_files/files_with_spaces/normal_dir/two_file: -------------------------------------------------------------------------------- 1 | moredata 2 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/dir space/one_file: -------------------------------------------------------------------------------- 1 | somedata 2 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/dir2 space/file1: -------------------------------------------------------------------------------- 1 | this is a multi- 2 | line file 3 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/file1 space1: -------------------------------------------------------------------------------- 1 | one space in filename 2 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/file2 space2: -------------------------------------------------------------------------------- 1 | two spaces in filename 2 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/file3 -dash: -------------------------------------------------------------------------------- 1 | space and dash 2 | -------------------------------------------------------------------------------- /test/data-dir/files_with_spaces/normal_dir/two_file: -------------------------------------------------------------------------------- 1 | moredata 2 | -------------------------------------------------------------------------------- /test/data-dir/multi-line-ascii: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | but there is no file extension on this one. 3 | 4 | gppdir should encrypt this file under the test suite. 5 | 6 | This file is in the top-level data-dir directory. 7 | -------------------------------------------------------------------------------- /test/data-dir/multi-line-ascii.txt: -------------------------------------------------------------------------------- 1 | This is a file that contains multiple lines of ascii text, 2 | and this file has a .txt extension (which gpgdir should handle 3 | without issues). 4 | 5 | gppdir should encrypt this file under the test suite. 6 | 7 | This file is in the top-level data-dir directory. 8 | -------------------------------------------------------------------------------- /test/data-dir/random-binary-data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/random-binary-data -------------------------------------------------------------------------------- /test/data-dir/random-binary-data.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrash/gpgdir/8a6f9a1bc8766f504041a0f6253220ce6c9c336a/test/data-dir/random-binary-data.bin -------------------------------------------------------------------------------- /test/output/README: -------------------------------------------------------------------------------- 1 | This directory is used by the gpgdir test suite to store test output (both 2 | stdout and stderr) from various tests against gpgdir. The gpgdir test suite 3 | creates files in this directory with a ".N" extension according to each test 4 | number. 5 | 6 | The files in this directory are useful for debugging purposes, and if there is 7 | a problem running gpgdir on a particular system then the information in this 8 | directory along with the output of the test suite may provide a clues as to 9 | why. If gpgdir appears to not be working properly and you want additional 10 | help to diagnose the problem, you can tar up the output/ directory and send it 11 | to Michael Rash at the following email address: mbr@cipherdyne.org 12 | 13 | --------------------------------------------------------------------------------