34 hours agoNote that Mark added Braintree payment module master github/master
Jon Jensen [Wed, 19 Sep 2018 21:49:39 +0000]
Note that Mark added Braintree payment module

2 days agoRaise minimum Perl version to 5.14.1
Jon Jensen [Tue, 18 Sep 2018 19:51:12 +0000]
Raise minimum Perl version to 5.14.1

and fill out WHATSNEW document with recent changes.

2 days agoFix loop interpolation bug on Perl 5.28
Jon Jensen [Tue, 18 Sep 2018 18:57:51 +0000]
Fix loop interpolation bug on Perl 5.28

Without this fix, the Strap demo [if-item-field] ... [/if-item-field]
loop tags are broken on the flypage and elsewhere.

This bug shows that Perl 5.28 no longer processes string concatenation
from left to right such that it is safe to autoincrement a variable that
is referred to elsewhere in the concatenation as well.

I have not seen any other reports of people running into this problem, but
the new behavior can be inferred from the "perl5280delta" documentation
which notes under "Performance Enhancements":

    Many string concatenation expressions are now considerably faster,
    due to the introduction internally of a "multiconcat" opcode which
    combines multiple concatenations, and optionally a "=" or ".=", into
    a single action.

The perlop documentation for "Auto-increment and Auto-decrement" reads:

    "++" and "--" work as in C. [...]

    Note that just as in C, Perl doesn't define when the variable is
    incremented or decremented. You just know it will be done sometime
    before or after the value is returned. This also means that modifying a
    variable twice in the same statement will lead to undefined behavior.
    Avoid statements like:

        $i = $i ++;
        print ++ $i + $i ++;

    Perl will not guarantee what the result of the above statements is.

That does not address changing the variable once and referring to it in
other places, but now it should.

2 days agoCorrect some misleading debugging output
Jon Jensen [Tue, 18 Sep 2018 18:57:25 +0000]
Correct some misleading debugging output

2 days agoFix nonstandard SQL
Jon Jensen [Tue, 18 Sep 2018 18:02:42 +0000]
Fix nonstandard SQL

2 days agoQuell new warning in Perl 5.28
Jon Jensen [Tue, 18 Sep 2018 17:53:48 +0000]
Quell new warning in Perl 5.28

Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.32)

2 days agoFix race conditions in timed-build output
Jon Jensen [Tue, 18 Sep 2018 17:26:12 +0000]
Fix race conditions in timed-build output

Add a writefile_atomic() routine that is only used for writing complete
files, not appending or piping, and is atomic on a POSIX filesystem,
and have timed-build use that.

Reorder the locking in the classic writefile() to return the race
condition vulnerability window back to the much smaller time it was before
the introduction of UTF-8 support, to make it very unlikely to occur.

Detailed explanation of the problem and fix:

Recently I was surprised to run into a bug in Interchange's timed-build
generation routine on a client's production system.

First see the source of &Vend::Interpolate::timed_build and then look
at &Vend::File::writefile, especially this:

    open(MVLOGDATA, $file) or die "open\n";
    if ($encoding) {
        local $PerlIO::encoding::fallback = $fallback;
        binmode(MVLOGDATA, ":encoding($encoding)");
    }

    lockfile(\*MVLOGDATA, 1, 1) or die "lock\n";
    seek(MVLOGDATA, 0, 2) or die "seek\n";
    if(ref $data) {
        print(MVLOGDATA $$data) or die "write to\n";
    }
    else {
        print(MVLOGDATA $data) or die "write to\n";
    }
    unlockfile(\*MVLOGDATA) or die "unlock\n";

Note that $file will contain ">/path/to/timed_build_file" so it causes
the file to be opened in write mode and truncated.

That alone is a race condition: When a file is truncated, there's a
brief time before it's written to when it's empty and any other process
reading it will get an empty file.

The introduction of UTF-8 support has made that race window longer because
right after truncation the binmode() call is made with :encoding(UTF-8)
or whatever, which can induce dynamic Encode package loads, which is
relatively slow.

That is one bug, but the bug I encountered is different and much weirder:
Two timed build files generated by Interchange each had their contents
doubled.

That is, if the file should have contained "HORSES\n", it instead
contained "HORSES\nHORSES\n".

I've never seen such a thing before, but it happened in two separate
timed-build files that both get used right after each other in ITL,
so if it's caused by a race condition, it's believable that both would
happen in the same run because they're sequential, so the same thing
that caused it one place could cause it another.

Now let's walk through the above code as run by two concurrent
processes to see the race as it happens.

Process A runs this:

    open(MVLOGDATA, $file) or die "open\n";

And then process B runs it:

    open(MVLOGDATA, $file) or die "open\n";

Process A runs this:

    if ($encoding) {
        local $PerlIO::encoding::fallback = $fallback;
        binmode(MVLOGDATA, ":encoding($encoding)");
    }

Then process B runs it:

    if ($encoding) {
        local $PerlIO::encoding::fallback = $fallback;
        binmode(MVLOGDATA, ":encoding($encoding)");
    }

Process A runs this:

    lockfile(\*MVLOGDATA, 1, 1) or die "lock\n";

Then process B runs it and blocks on the lock:

    lockfile(\*MVLOGDATA, 1, 1) or die "lock\n";

Process A runs this:

    seek(MVLOGDATA, 0, 2) or die "seek\n";
    if(ref $data) {
        print(MVLOGDATA $$data) or die "write to\n";
    }
    else {
        print(MVLOGDATA $data) or die "write to\n";
    }
    unlockfile(\*MVLOGDATA) or die "unlock\n";

and the timed-build file is written correctly and unlocked.

That unblocks process B which now runs this:

    seek(MVLOGDATA, 0, 2) or die "seek\n";

which, oddly for this situation where we are writing to a truncated file,
seeks to the end of the file! That appears to be a recipe gotten from
the Perl flock() documentation:

    flock($fh, LOCK_EX) or die "Cannot lock mailbox - $!\n";
    # and, in case we're running on a very old UNIX
    # variant without the modern O_APPEND semantics...
    seek($fh, 0, SEEK_END) or die "Cannot seek - $!\n";

and would be harmless if the file is still truncated, but now that the
file has been written to, means we seek to the end of the file and start
writing there!

Now process B runs this:

    if(ref $data) {
        print(MVLOGDATA $$data) or die "write to\n";
    }
    else {
        print(MVLOGDATA $data) or die "write to\n";
    }
    unlockfile(\*MVLOGDATA) or die "unlock\n";

And we have two copies of the same timed-build output, one after the
other, in the same file.

This bug has always existed in this code, but I think it became many
times more likely to be encountered once the binmode() with encoding
was added because that can be so slow.

There are a few ways to try to solve the doubling problem:

1. Just remove the seek() call which appears to have been only to cope
with Unix systems that were already old and rare at the time the Perl
flock() docs were written. Then when the doubling problem hits in the
future, it'll write the same timed-build output once, then over itself
again.

If the timed-build runs return output of differing length, it could
cause the tail end of the longer one to appear after the shorter one,
which might be an even more confusing bug than this one.  But we could
call truncate() to empty the rest of the file and remove the risk of
the longer pieces remaining from before.

This isn't attractive, though, because I don't know for sure that removing
the seek() is actually safe, and on which systems.

2. Call the binmode() to set the encoding *after* taking the lock. This
seems like the right thing to do anyway, but it only narrows the window
for the race condition, and doesn't remove it entirely.

3. Overhaul the routine to use standard practice in writing a shared
file atomically.

It seems only (3) really solves both of the bugs. We can achieve our
goal with a procedure like this:

a. Open a new randomly-named temporary file in the same directory.

b. Write to it.

c. Close it.

d. Rename it over the original file.

Renaming is an atomic operation when done within a single POSIX
filesystem. It isn't atomic for reads over NFS, but writefile() didn't
support fcntl() locking for NFS anyway, so we're not making that problem
any worse.

This doesn't stop concurrent timed-build writes from happening, but they
would harmlessly replace each other in a way that would never leave an
empty or partially-written file, would keep concurrent reads from ever
getting a stale timed-build file, and doesn't need locking at all.

Thanks to Mark Johnson for review.

5 weeks agoTeach send_mail() about MV_EMAIL_CHARSET
David Christensen [Mon, 13 Aug 2018 21:38:59 +0000]
Teach send_mail() about MV_EMAIL_CHARSET

2 months agoMake Interchange reopen debug.log/STDERR when receiving HUP signal
David Christensen [Mon, 9 Jul 2018 19:15:25 +0000]
Make Interchange reopen debug.log/STDERR when receiving HUP signal

Co-authored-by: David Christensen <david@endpoint.com>
Co-authored-by: Jon Jensen <jon@endpoint.com>

2 months agoWhack pointless historical code
David Christensen [Mon, 11 Jun 2018 18:10:58 +0000]
Whack pointless historical code

3 months agoFix timecard_stamp() to support a passed timestamp.
Peter Ajamian [Thu, 21 Jun 2018 15:28:44 +0000]
Fix timecard_stamp() to support a passed timestamp.

timecard_stamp() was originally designed and documented to support the ability
to pass a timestamp as a second arg, but due to a typo it never has.  This
commit fixes that issue.

4 months agoConvert README to Markdown for nice GitHub viewing
Jon Jensen [Tue, 15 May 2018 04:56:31 +0000]
Convert README to Markdown for nice GitHub viewing

As suggested in GitHub issue #99.

Along the way, update some things that needed it.

4 months agoBump Vend::Util version
Jon Jensen [Tue, 15 May 2018 04:26:10 +0000]
Bump Vend::Util version

4 months agoSupport recipient addresses in CC and BCC when using Net::SMTP
Andrew Baerg [Wed, 9 May 2018 19:21:04 +0000]
Support recipient addresses in CC and BCC when using Net::SMTP

4 months agoRemove non-header from BounceReferrals HTTP response headers
Jon Jensen [Tue, 1 May 2018 16:56:01 +0000]
Remove non-header from BounceReferrals HTTP response headers

This invalid extra quasi-header has been there from the beginning of
this feature, but recent versions of Apache surfaced it when they started
throwing a 500 error when seeing a non-header in the header data.

5 months agoFix broken random password number range; consistently make random instead of using...
Jon Jensen [Sat, 7 Apr 2018 03:40:08 +0000]
Fix broken random password number range; consistently make random instead of using zip or phone

It's gross to have this logic duplicated, but fixing that is a task for
another day.

5 months agoRemove MySQL userdb.password NOT NULL constraint to match Postgres
Jon Jensen [Sat, 7 Apr 2018 00:18:42 +0000]
Remove MySQL userdb.password NOT NULL constraint to match Postgres

5 months agoNewer MySQL versions need ISO timestamp, just like Postgres does
Jon Jensen [Sat, 7 Apr 2018 00:12:01 +0000]
Newer MySQL versions need ISO timestamp, just like Postgres does

Tested with Oracle's distribution of MySQL 5.7.

5 months agoRemove invalid date default that doesn't work with more strict MySQL 5.7
Jon Jensen [Fri, 6 Apr 2018 22:13:16 +0000]
Remove invalid date default that doesn't work with more strict MySQL 5.7

5 months agoFix bug in &Vend::Data::update_data
Jon Jensen [Tue, 3 Apr 2018 20:56:07 +0000]
Fix bug in &Vend::Data::update_data

I inadvertently introduced this bug in commit fa639368 while optimizing
a loop. The arrayref passed to set_slice is, in some cases, apparently
mutated somewhere down the line, though it worked fine in my tests.

Found by Gert van der Spoel <gert@3edge.com>. Thanks, Gert!

5 months agoRemove debugging message from metadata help
Jon Jensen [Thu, 22 Mar 2018 22:21:26 +0000]
Remove debugging message from metadata help

6 months agoadd better error handling/messaging when no access to database in Safe
Andrew Baerg [Tue, 13 Mar 2018 03:49:44 +0000]
add better error handling/messaging when no access to database in Safe

When a db/table has not been pre-opened before attempting to access it in the Safe container, you would usually get a message in the error.log "Can't locate object method open_table via package Vend::Table::DBI"

This commit introduces a more relevant error message along with pointers to help fix the error.

See http://www.icdevgroup.org/pipermail/interchange-users/2018-March/055798.html

6 months agoMerge PR #87 https://github.com/interchange/interchange/pull/87
Jon Jensen [Thu, 22 Mar 2018 15:20:27 +0000]
Merge PR #87 https://github.com/interchange/interchange/pull/87

6 months agoMerge pull request #109 from pullingshots/master
David Christensen [Sun, 4 Mar 2018 17:02:14 +0000]
Merge pull request #109 from pullingshots/master

FIX: exclude canceled orders from reports

6 months agoFIX: exclude canceled orders from reports
Andrew Baerg [Sun, 4 Mar 2018 06:09:33 +0000]
FIX: exclude canceled orders from reports

6 months agoFix table editor composite key problems, both creating new and editing existing rows
Jon Jensen [Thu, 1 Mar 2018 03:12:41 +0000]
Fix table editor composite key problems, both creating new and editing existing rows

Also refactor some code along the way.

6 months agoSimplify some code (no functional change)
Jon Jensen [Thu, 1 Mar 2018 03:10:20 +0000]
Simplify some code (no functional change)

6 months agoFix typo
Jon Jensen [Thu, 1 Mar 2018 03:06:31 +0000]
Fix typo

6 months agoImprove some logging
Jon Jensen [Thu, 22 Feb 2018 05:49:51 +0000]
Improve some logging

7 months agoAdjust MySQL key lengths to 191 characters
Josh Lavin [Sat, 17 Feb 2018 00:12:57 +0000]
Adjust MySQL key lengths to 191 characters

- since default encoding is utf8mb4:
    ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
- the max index prefix length is 767 bytes
- utf8mb4 max character length is 4 bytes, so 4*191 = 764
- per: https://stackoverflow.com/a/31474509

8 months agoX-Accel-Expires: Might as well use sensible shorthand!
Jon Jensen [Tue, 16 Jan 2018 23:45:49 +0000]
X-Accel-Expires: Might as well use sensible shorthand!

8 months agoAdd x_accel_expires pragma to set X-Accel-Expires header
Jon Jensen [Tue, 16 Jan 2018 23:39:58 +0000]
Add x_accel_expires pragma to set X-Accel-Expires header

This allows us to have an nginx proxy cache responses for a different
length of time than the end client will based on the Cache-Control
header. For details see:

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_valid

8 months agoGatewayLog adjustments
Mark Johnson [Sat, 6 Jan 2018 19:08:03 +0000]
GatewayLog adjustments

* Add fallback to session ID in PayflowPro

* Allow arbitrary attributes to be added to the Vend::Payment::GatewayLog
  object.

* Pull email field in PaypalExpress directly from $Values; in testing,
  $actual and $opt->{actual} were undefined.

* Field modifications for gateway log

  + Remove order_md5

  + Add amount, host_ip, username

  + Create cart_md5 that hashes $Vend::Items if it has any items.
    Otherwise, left blank.

8 months agoPrevent bug when using scalar as ARRAY ref
Josh Lavin [Fri, 5 Jan 2018 16:34:25 +0000]
Prevent bug when using scalar as ARRAY ref

- resulting in error: (Can't use string ("snip") as an ARRAY ref while
  "strict refs" in use at interchange/lib/Vend/Scan.pm line 353.
)

9 months agoAlso look in the next-highest directory when detecting VCS; add SVN
David Christensen [Thu, 7 Dec 2017 17:05:13 +0000]
Also look in the next-highest directory when detecting VCS; add SVN

10 months agoMove version-detecting code earlier in Makefile.PL when stamping
David Christensen [Fri, 17 Nov 2017 23:25:17 +0000]
Move version-detecting code earlier in Makefile.PL when stamping

This fixed an issue with not properly stamping when generating via `perl Makefile.PL nocopy`

Reported-by: Josh Lavin <jlavin@endpoint.com>

10 months agoAdd GatewayLog docs into WHATSNEW
David Christensen [Tue, 14 Nov 2017 22:17:04 +0000]
Add GatewayLog docs into WHATSNEW

10 months agoFix non-deterministic UTF8 handling with PostgreSQL database
David Christensen [Tue, 14 Nov 2017 20:41:09 +0000]
Fix non-deterministic UTF8 handling with PostgreSQL database

If using PostgreSQL and versions of DBD::Pg >= 3, code will behave differently if no value is set in
config for DatabaseDefault PG_ENABLE_UTF8.  This would affect installations which were even opting
out of all UTF-8 support in Interchange by using the MINIVEND_DISABLE_UTF8 environment variable.

This happened because the default UTF-8 handling for DBD::Pg as of 3.0 turned into automatically
decoding UTF-8 data as perl scalarsm so catalogs/stacks which were now using a new version of
DBD::Pg could run into unexpected behavior (at the very least, increased parsing time due to using
unicode-aware regexes under-the-hook).

Specify the default to be off to match the existing state before this module; in all cases, you have
to opt in to UTF-8 specific IC, so no reason to change this here.

Reviewed-by: Mark Johnson <mark@endpoint.com>

10 months agoFix unintentionally short local scoping
David Christensen [Mon, 13 Nov 2017 21:34:23 +0000]
Fix unintentionally short local scoping

10 months agoAdd gateway_log support to Braintree
Mark Johnson [Mon, 13 Nov 2017 15:44:53 +0000]
Add gateway_log support to Braintree

10 months agoPaypalExpress gateway logging bugfixes
Mark Johnson [Sun, 5 Nov 2017 22:30:13 +0000]
PaypalExpress gateway logging bugfixes

* Syntax error

* Structure of response may change on certain errors, causing deep
  hash references to produce a strict error.

10 months agoClean up trailing spaces and update copyright
Mark Johnson [Fri, 3 Nov 2017 22:14:18 +0000]
Clean up trailing spaces and update copyright

10 months agoMove gateway_log DB definitions into strap
Mark Johnson [Fri, 3 Nov 2017 21:52:51 +0000]
Move gateway_log DB definitions into strap

10 months agoGatewayLog module improvements
Mark Johnson [Wed, 8 Jan 2014 03:11:27 +0000]
GatewayLog module improvements

* Switch hash tests from ref() to UNIVSERAL::isa() to keep
  blessed hashes from producing false negatives.

* Move major failure log writes from debug to global error.

* Modified DESTROY to call log_it() via eval {} to quiet
  any impact of a failed call on parent code and ensure that
  any unexpected failure is logged to the global error log.

10 months agoFix glitch setting result_code to database.
Mark Johnson [Sat, 9 Jan 2010 20:34:27 +0000]
Fix glitch setting result_code to database.

Another spot where 0 caused trouble.

10 months agoFix glitch on result_code map test.
Mark Johnson [Sat, 9 Jan 2010 20:16:52 +0000]
Fix glitch on result_code map test.

0 is a valid and expected response. Change test from perly true
to length.

10 months agoIntegrate gateway logging to Vend::Payment::CyberSource
Mark Johnson [Sat, 9 Jan 2010 19:49:10 +0000]
Integrate gateway logging to Vend::Payment::CyberSource

10 months agoAdded new Source option.
Mark Johnson [Fri, 18 Dec 2009 04:25:22 +0000]
Added new Source option.

* New Source option to GatewayLog, accessed via source(), intended to set
  into the request_source field. Default sets to `hostname -s`.

* Replaced hard-coded set of request_field value from gateway modules with
  value returned from source().

* Refactored constructor to call out to init() sub for setting params passed
  in appropriately.

* Adjusted POD in GatewayLog module.

10 months agoAdding stubs for debugging calls.
Mark Johnson [Fri, 18 Dec 2009 03:28:00 +0000]
Adding stubs for debugging calls.

10 months agoAdd gateway_log to PaypalExpress.pm
Mark Johnson [Tue, 29 Sep 2009 19:45:34 +0000]
Add gateway_log to PaypalExpress.pm

10 months agoAdd gateway_log to AuthorizeNet.pm
Mark Johnson [Tue, 8 Sep 2009 17:34:02 +0000]
Add gateway_log to AuthorizeNet.pm

* Expanded out gateway_log fields to include new Authnet-specific
  return values.

* Migrated chunk of log_it() code that would clearly be exactly
  duplicated between implementations into a new write() sub that
  actually updates the database and logs any errors that occur.

10 months agoVend::Payment::GatewayLog
Mark Johnson [Tue, 8 Sep 2009 02:25:21 +0000]
Vend::Payment::GatewayLog

* New module facilitates adding logging support for all
  transactions through any of the standard gateway modules.

* Introduce logging support to Vend::Payment::PayflowPro.

* Fully sever database connections in Vend::Payment when
  global timeout is invoked. Code operating in production
  proved to behave unpredictably when parent and child shared
  the same database server.

* Add gateway_log table to standard in expected format for each
  DBI database type.

* Adjusted Vend::Table::DBI to support SQLite's AUTOINCREMENT
  in parallel to same support of MySQL's feature.

10 months agoAdd back in commit counter, some cleanup/logic documentation
David Christensen [Fri, 3 Nov 2017 19:11:43 +0000]
Add back in commit counter, some cleanup/logic documentation

10 months agoWhack strap's admin override login page, now redundant
David Christensen [Fri, 3 Nov 2017 18:16:57 +0000]
Whack strap's admin override login page, now redundant

10 months agoAdd COMPANY var to admin page title
Josh Lavin [Fri, 3 Nov 2017 18:12:26 +0000]
Add COMPANY var to admin page title

- helps identify various IC sites in browser tabs, also for password
  managers that rely on page title for auto-fill.

10 months agoRemove file from MANIFEST
David Christensen [Fri, 3 Nov 2017 17:44:39 +0000]
Remove file from MANIFEST

10 months agoRemove unneeded strap merge_meta admin page (which had also had an error)
David Christensen [Fri, 3 Nov 2017 17:23:31 +0000]
Remove unneeded strap merge_meta admin page (which had also had an error)

10 months agoMake get_dist_version() smarter about which future version numbers might be
David Christensen [Fri, 3 Nov 2017 16:47:19 +0000]
Make get_dist_version() smarter about which future version numbers might be

10 months agoVend::Payment::Braintree payment module
Mark Johnson [Fri, 3 Nov 2017 16:46:59 +0000]
Vend::Payment::Braintree payment module

Provides Interchange payment module to wrap Net::Braintree CPAN module
suite for supporting modern Braintree Perl implementation.

See POD for documentation.

10 months agoUpdate get_dist_version() to consider any post-tag commits as being on devel branch
David Christensen [Fri, 3 Nov 2017 15:49:35 +0000]
Update get_dist_version() to consider any post-tag commits as being on devel branch

10 months agoUse calculated version from Makefile.PL instead of interchange.PL
David Christensen [Fri, 3 Nov 2017 15:18:23 +0000]
Use calculated version from Makefile.PL instead of interchange.PL

10 months agoNormalize the version returned by the get_dist_version()
David Christensen [Fri, 3 Nov 2017 15:17:31 +0000]
Normalize the version returned by the get_dist_version()

10 months agoStrap version of Admin create-customer page
Josh Lavin [Fri, 3 Nov 2017 14:46:53 +0000]
Strap version of Admin create-customer page

which only redirects viewers to the front-end of the website, since the
original create-customer page is broken for usernick and email-as-login.

10 months agoMake the distribution name also use the computed version
David Christensen [Fri, 3 Nov 2017 13:40:52 +0000]
Make the distribution name also use the computed version

10 months agoMove version detection to its own routine
David Christensen [Fri, 3 Nov 2017 13:40:34 +0000]
Move version detection to its own routine

10 months agoFix unqualified relative include with removal of '.' from $PERL5LIB
David Christensen [Thu, 2 Nov 2017 20:52:54 +0000]
Fix unqualified relative include with removal of '.' from $PERL5LIB

10 months agoWhitespace cleanup
David Christensen [Thu, 2 Nov 2017 20:50:59 +0000]
Whitespace cleanup

[no-ci]

10 months agoMake Makefile.PL die a hero's death if it can't chdir() to RealBin
David Christensen [Thu, 2 Nov 2017 20:44:40 +0000]
Make Makefile.PL die a hero's death if it can't chdir() to RealBin

10 months agorename .ic-version to _ic_version for style consistency
David Christensen [Thu, 2 Nov 2017 20:42:51 +0000]
rename .ic-version to _ic_version for style consistency

10 months agoCleanup .ic-version on `make clean`
David Christensen [Thu, 2 Nov 2017 20:14:58 +0000]
Cleanup .ic-version on `make clean`

10 months agoSelectively display online_check fields, for AuthNet or not
Josh Lavin [Thu, 2 Nov 2017 20:07:50 +0000]
Selectively display online_check fields, for AuthNet or not

10 months agoAdd feature to tag/use the current development version for `make tardist`
David Christensen [Thu, 2 Nov 2017 20:05:29 +0000]
Add feature to tag/use the current development version for `make tardist`

10 months agoUse interpolated VERSION in various display pieces
David Christensen [Thu, 2 Nov 2017 19:23:13 +0000]
Use interpolated VERSION in various display pieces

10 months agoTeach Makefile.PL about where to get VERSION from
David Christensen [Thu, 2 Nov 2017 19:22:46 +0000]
Teach Makefile.PL about where to get VERSION from

10 months agoAdjust relocate.pl to optionally remove the commented indicator line
David Christensen [Thu, 2 Nov 2017 17:06:34 +0000]
Adjust relocate.pl to optionally remove the commented indicator line

10 months agoRemove CVS $Revision$ tags
Jon Jensen [Thu, 2 Nov 2017 15:53:56 +0000]
Remove CVS $Revision$ tags

10 months agoMake transactions.update_date PREFER_NULL
Jon Jensen [Thu, 2 Nov 2017 05:51:40 +0000]
Make transactions.update_date PREFER_NULL

Otherwise order editing in the admin fails.

Also sync the transactions indexes between the 3 database types.

10 months agoAllow userdb.usernick to be NULL
Jon Jensen [Thu, 2 Nov 2017 05:41:05 +0000]
Allow userdb.usernick to be NULL

Otherwise guest checkout doesn't work.

10 months agoMake userdb.mod_time NULL instead of invalid date '0000-00-00 00:00:00'
Jon Jensen [Thu, 2 Nov 2017 01:42:28 +0000]
Make userdb.mod_time NULL instead of invalid date '0000-00-00 00:00:00'

PostgreSQL doesn't tolerate the invalid date.

10 months agoRemove redundant failure check (Getopt::Std doesn't set $@)
Jon Jensen [Thu, 2 Nov 2017 01:16:42 +0000]
Remove redundant failure check (Getopt::Std doesn't set $@)

10 months agoClear or don't check $@ in cases where eval is not called
Jon Jensen [Thu, 2 Nov 2017 01:15:24 +0000]
Clear or don't check $@ in cases where eval is not called

The contents of $@ are unknown if eval isn't run, so we can't rely on it
unless we set it ourselves.

10 months agoUse get_hash error API instead of $@ at a distance
Jon Jensen [Thu, 2 Nov 2017 01:12:25 +0000]
Use get_hash error API instead of $@ at a distance

10 months agoReorder and/or cache $@ to prevent accidental alteration before it is used
Jon Jensen [Thu, 2 Nov 2017 01:10:39 +0000]
Reorder and/or cache $@ to prevent accidental alteration before it is used

It is easy to lose $@ in another function call that may itself have an
eval, leading to missing or wrong errors being reported.

Some of this is fixing what can be real problems, and some is for
prevention, to reduce the chance of future changes breaking things.

10 months agoExplicitly set $@ for cases where set_field() doesn't set $@
Jon Jensen [Thu, 2 Nov 2017 01:04:40 +0000]
Explicitly set $@ for cases where set_field() doesn't set $@

10 months agoRemove bogus usage of $@, which File::Copy doesn't set on error
Jon Jensen [Sat, 22 Aug 2009 23:21:47 +0000]
Remove bogus usage of $@, which File::Copy doesn't set on error

10 months agoCorrect printf arguments in error message
Jon Jensen [Thu, 2 Nov 2017 01:02:15 +0000]
Correct printf arguments in error message

Before the fix this unintentionally printed $@ twice.

10 months agoUse $db->errstr instead of not necessarily set $@ to get error messages
Jon Jensen [Thu, 2 Nov 2017 01:01:19 +0000]
Use $db->errstr instead of not necessarily set $@ to get error messages

10 months agoRemove overcomplicated abort when running on Windows
Jon Jensen [Thu, 2 Nov 2017 00:58:10 +0000]
Remove overcomplicated abort when running on Windows

Strawberry Perl, for example, can use CPAN. Most of Interchange probably
doesn't work on Windows anymore, but there's no reason to bail on it here.

10 months agoTag import-fields: make error handling more robust
Jon Jensen [Thu, 2 Nov 2017 00:56:30 +0000]
Tag import-fields: make error handling more robust

Some database types' set_slice do not eval, and thus do not reliably
set $@ so we should clear it first.

Include $@ if it is set. This is still messy, because an unrelated eval
in set_slice or something it calls could leave a bogus error, but without
rewriting every set_slice completely, this is the best we can do.

The set_slice method returns undef on failure or a new key on success,
so check for that instead.

10 months agoSync MANIFEST
Jon Jensen [Wed, 1 Nov 2017 23:00:57 +0000]
Sync MANIFEST

10 months agoRemove remaining CVS Id tags
Jon Jensen [Wed, 1 Nov 2017 22:57:45 +0000]
Remove remaining CVS Id tags

These are actively misleading now, after 8 1/2 years of using Git
when the tags do not get updated.

Most of these were automatically removed with:

perl -pi -0777 -e 's/\n[ \t]*#[ \t]*\n[ \t]*#[ \t]*\$Id[^\n]+//' `git grep -l '\$Id' code lib scripts`

and the rest were done manually.

10 months agoEscape regex literal .
Jon Jensen [Wed, 1 Nov 2017 22:39:48 +0000]
Escape regex literal .

10 months agoRemove defunct payment gateways
David Christensen [Wed, 1 Nov 2017 20:57:51 +0000]
Remove defunct payment gateways

10 months agoWHATSNEW for 5.12
David Christensen [Tue, 31 Oct 2017 16:57:08 +0000]
WHATSNEW for 5.12

10 months agoUpdate PaypalExpress module, by Lyn St George
Josh Lavin [Wed, 1 Nov 2017 16:38:12 +0000]
Update PaypalExpress module, by Lyn St George

version 1.1.0 -> 1.1.6

10 months agoUpdate WHATSNEW structure
David Christensen [Fri, 27 Oct 2017 16:13:19 +0000]
Update WHATSNEW structure

10 months agoUpdate MANIFEST.SKIP
David Christensen [Fri, 27 Oct 2017 16:10:25 +0000]
Update MANIFEST.SKIP

10 months agoUpdate Copyright dates and Version Numbers
David Christensen [Fri, 27 Oct 2017 16:04:35 +0000]
Update Copyright dates and Version Numbers

10 months agoChange deprecated POSIX::tmpnam to File::Temp versions
David Christensen [Tue, 24 Oct 2017 22:04:35 +0000]
Change deprecated POSIX::tmpnam to File::Temp versions

10 months agoResolve shipping tag Safe issue in perl block
Josh Lavin [Tue, 24 Oct 2017 16:29:22 +0000]
Resolve shipping tag Safe issue in perl block

- if $Tag->shipping() is called from a catalog-level [perl] block, it
  would fail with thrown error of: 'eval "string"' trapped by
  operation mask
- if you are already in a Safe container, then don't start _another_ one
  with `reval`