in reply to shift, undef and 'or die'

die "Type not provided" unless @_; my $data_type= shift(@_);

Is probably how I'd do it (though there are certainly other ways). (:

        - tye (but my friends call me "Tye")