Fixed RT#90683
make it work with dzil v5
fix smartmatch warnings
v4.000

 - fix Moose enum warning (rt#90683)
 - make it work with dzil v5
 - fix smartmatch warnings