robkinyon / dbm-deep

DBM::Deep Perl module
http://search.cpan.org/dist/DBM-Deep/
11 stars 16 forks source link

Add 5.6 support (without unicode features) #8

Open rurban opened 11 years ago

cpansprout commented 11 years ago

By avoiding ‘use constant’, you are preventing unused code paths from being optimised away, creating a run-time speed hit. The most recent constant.pm release might not work in 5.6, but 5.6 already comes with its own constant.pm, which should work. Apart from that, I think the patch is fine.

robkinyon commented 11 years ago

I would like the following two changes:

  1. Please add "use constant" back in per cpansprout's suggestion
  2. Please add a CAN_UNICODE (or somesuch name) constant that is the check for $] >= 5.008003. The first is that I don't like that check just randomly scattered about. The second is that we may expand the can_unicode check to include other criteria. Self-documenting code, where possible, is ideal.

Once you do those two things, I will merge.