References are not allowed as default values, you must wrap the default of 're' in a CODE reference (ex: sub { [] } and not []) at ...