fix "Indirect call of method" error occurring in some perls