++ed by:

1 PAUSE user
1 non-PAUSE user.

Ricardo SIGNES 😄
and 2 contributors


Exception::Reporter::Dumpable::File - a dumpable object for a file on disk


version 0.014


      [ import_file => Exception::Reporter::Dumpable::File->new(
                         { mimetype => 'text/csv', charset => 'us-ascii' },
                       ) ],

This class exists to provide a simple way to tell Exception::Reporter to include a file from disk. To make this useful, you should also include Exception::Reporter::Summarizer::File in your summarizers.

Right now, file content is read as soon as the file is constructed. This may change in the future.



  my $file_dumpable = Exception::Reporter::Dumpable::File->new(

Useful arguments are:

  mimetype - defaults to a guess by extension or application/octet-stream
  charset  - defaults to utf-8 for text, undef otherwise
  max_size - the maximum size to include; if the file is larger, a placeholder
             will be included instead

If the file object can't be constructed, the method does not die. This to avoid requiring exception handling in your exception handling. Instead, new will return a string which will then be summarized as any other string.

Maybe this will change in the future, and the file summarizer will know how to expect File::Error objects, or something like that.


Ricardo Signes <rjbs@cpan.org>


This software is copyright (c) 2010 by Ricardo Signes.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.