Guest User

Untitled

a guest
Jun 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. package Submitnet::Format::BadFormat;
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. use Exporter 'import';
  7. our @EXPORT = qw(bad_format);
  8.  
  9. use overload (
  10. fallback => 1,
  11. '""' => sub {
  12. my ($self) = @_;
  13. return $$self;
  14. },
  15. );
  16.  
  17. sub bad_format {
  18. my ($error_message) = @_;
  19. die bless \$error_message, __PACKAGE__;
  20. }
Add Comment
Please, Sign In to add comment