[freeside] your Business::CreditCard CPAN module

ivan ivan at 420.am
Sat Dec 2 16:52:21 PST 2000


Oops, bad form to respond to my own post.  The patch below contains a
small error:

@ISA = qw( Exporter $VERSION );

should of course be:

@ISA = qw( Exporter );
use vars qw( $VERSION );

sorry about that.  Thanks again!

On Sat, Dec 02, 2000 at 02:32:59AM -0800, ivan wrote:
> Hello Jon,
> 
> Any chance of getting a proper Makefile.PL-based installation for
> Business::CreditCard?  I depend on it for a package I distribute, and it
> would help me out if people were able to install using CPAN.pm.  A patch 
> to accomplish this is attached if that helps.  Thanks!
> 
> -- 
> meow
> _ivan

> # This is a patch for Business-CreditCard-0.21 to update it to Business-CreditCard-0.22
> # 
> # To apply this patch:
> # STEP 1: Chdir to the source directory.
> # STEP 2: Run the 'applypatch' program with this patch file as input.
> #
> # If you do not have 'applypatch', it is part of the 'makepatch' package
> # that you can fetch from the Comprehensive Perl Archive Network:
> # http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
> # In the above URL, 'x' should be 2 or higher.
> #
> # To apply this patch without the use of 'applypatch':
> # STEP 1: Chdir to the source directory.
> # If you have a decent Bourne-type shell:
> # STEP 2: Run the shell with this file as input.
> # If you don't have such a shell, you may need to manually create
> # the files as shown below.
> # STEP 3: Run the 'patch' program with this file as input.
> #
> # These are the commands needed to create/delete files/directories:
> #
> touch 'MANIFEST'
> chmod 0644 'MANIFEST'
> touch 'Makefile.PL'
> chmod 0644 'Makefile.PL'
> touch 'README'
> chmod 0644 'README'
> touch 'test.pl'
> chmod 0644 'test.pl'
> #
> # This command terminates the shell and need not be executed manually.
> exit
> #
> #### End of Preamble ####
> 
> #### Patch data follows ####
> diff -c 'Business-CreditCard-0.21/CreditCard.pm' 'Business-CreditCard-0.22/CreditCard.pm'
> Index: ./CreditCard.pm
> *** ./CreditCard.pm	Sat Jan 18 14:11:46 1997
> --- ./CreditCard.pm	Sat Dec  2 02:29:03 2000
> ***************
> *** 12,23 ****
>   # This program is free software; you can redistribute it and/or
>   # modify it under the same terms as Perl itself.
>   # 
> ! # Version 0.21.  Module list status is "Rdpf."
>   
>   require 5;
>   
>   require Exporter;
> ! @ISA = qw( Exporter );
>   
>   =head1 NAME
>   
> --- 12,25 ----
>   # This program is free software; you can redistribute it and/or
>   # modify it under the same terms as Perl itself.
>   # 
> ! # Version 0.22.  Module list status is "Rdpf."
>   
>   require 5;
>   
>   require Exporter;
> ! @ISA = qw( Exporter $VERSION );
> ! 
> ! $VERSION = "0.22";
>   
>   =head1 NAME
>   
> ***************
> *** 62,72 ****
>   
>   These subroutines will also work if you provide the arguments
>   as numbers instead of strings, e.g. C<validate(5276440065421319)>.  
> - 
> - To install this module, change directories to wherever
> - your system keeps Perl modules (e.g. C</usr/local/lib/perl5>) and
> - create a C<Business> directory if there's isn't one already.
> - Then copy this file there.  That's it!
>   
>   =head1 AUTHOR
>   
> --- 64,69 ----
> diff -c /dev/null 'Business-CreditCard-0.22/MANIFEST'
> Index: ./MANIFEST
> *** ./MANIFEST	Wed Dec 31 16:00:00 1969
> --- ./MANIFEST	Sat Dec  2 02:29:55 2000
> ***************
> *** 0 ****
> --- 1,5 ----
> + CreditCard.pm
> + MANIFEST
> + Makefile.PL
> + test.pl
> + README
> diff -c /dev/null 'Business-CreditCard-0.22/Makefile.PL'
> Index: ./Makefile.PL
> *** ./Makefile.PL	Wed Dec 31 16:00:00 1969
> --- ./Makefile.PL	Sat Dec  2 02:26:38 2000
> ***************
> *** 0 ****
> --- 1,7 ----
> + use ExtUtils::MakeMaker;
> + # See lib/ExtUtils/MakeMaker.pm for details of how to influence
> + # the contents of the Makefile that is written.
> + WriteMakefile(
> +     'NAME'      => 'Business::CreditCard',
> +     'VERSION_FROM' => 'CreditCard.pm', # finds $VERSION
> + );
> diff -c /dev/null 'Business-CreditCard-0.22/README'
> Index: ./README
> *** ./README	Wed Dec 31 16:00:00 1969
> --- ./README	Sat Dec  2 02:28:14 2000
> ***************
> *** 0 ****
> --- 1,12 ----
> + Business::CreditCard
> + 
> + These subroutines tell you whether a credit card number is self-consistent --
> + whether the last digit of the number is a valid checksum for the preceding
> + digits. 
> + 
> + Jon Orwant 
> + 
> + The Perl Journal and MIT Media Lab 
> + 
> + orwant at tpj.com 
> + 
> diff -c /dev/null 'Business-CreditCard-0.22/test.pl'
> Index: ./test.pl
> *** ./test.pl	Wed Dec 31 16:00:00 1969
> --- ./test.pl	Sat Dec  2 02:27:19 2000
> ***************
> *** 0 ****
> --- 1,19 ----
> + # Before `make install' is performed this script should be runnable with
> + # `make test'. After `make install' it should work as `perl test.pl'
> + 
> + ######################### We start with some black magic to print on failure.
> + 
> + # Change 1..1 below to 1..last_test_to_print .
> + # (It may become useful if the test is moved to ./t subdirectory.)
> + 
> + BEGIN { $| = 1; print "1..1\n"; }
> + END {print "not ok 1\n" unless $loaded;}
> + use DBIx::DataSource;
> + $loaded = 1;
> + print "ok 1\n";
> + 
> + ######################### End of black magic.
> + 
> + # Insert your test code below (better if it prints "ok 13"
> + # (correspondingly "not ok 13") depending on the success of chunk 13
> + # of the test code):
> #### End of Patch data ####
> 
> #### ApplyPatch data follows ####
> # Data version        : 1.0
> # Date generated      : Sat Dec  2 02:31:23 2000
> # Generated by        : makepatch 2.00
> # Recurse directories : Yes
> # p 'CreditCard.pm' 3892 975752943 0100644
> # c 'MANIFEST' 0 975752995 0100644
> # c 'Makefile.PL' 0 975752798 0100644
> # c 'README' 0 975752894 0100644
> # c 'test.pl' 0 975752839 0100644
> #### End of ApplyPatch data ####
> 
> #### End of Patch kit [created: Sat Dec  2 02:31:23 2000] ####
> #### Checksum: 169 4978 49737 ####


-- 
meow
_ivan



More information about the freeside-users mailing list