Exception-Base

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.2201  2009-04-02      Piotr Roszatycki <dexter@debian.org>

Fixes:

* Method "match" works correctly if attribute contains ArrayRef.

Changes:

* POD is mixed with rest of code.

0.22    2009-03-24      Piotr Roszatycki <dexter@debian.org>

New:

* sprintf is used if "message" attribute is an array reference.

  Exception::Base->throw( message => ['Failed in %s', __PACKAGE__] );

Changes:

* Build requires Test::Unit::Lite 0.21.

0.21    2008-12-08      Piotr Roszatycki <dexter@debian.org>

Fixes:

* Skip ignored packages for verbosity level 2.

* Verbosity level can not be changed.  Reset internal cache with classes
  defaults after the default value was changed.

Changes:

* Method "import" was refactored.

0.20    2008-12-05      Piotr Roszatycki <dexter@debian.org>

New:

* Major API changes.

* New methods to_number/to_string replaced numerify/stringify.

* New method get_caller_stacktrace replaced _caller_backtrace.

* New method: to_bool.

* New internal function qualify_to_ref() which uses Symbol module if it is
  possible.

* Read-only attributes can be defined with pragma interface.

Removed:

* Removed methods: try, with.

* Removed export of try/catch/throw methods and :all tag.

Changes:

* Reference arguments stored as caller_stack are weakened if it is possible.

* catch method takes no arguments.

0.1901  2008-10-13      Piotr Roszatycki <dexter@debian.org>

Fixes:

* Some warnings disabled.

* Added missing test file to manifest.

* Some POD errors fixed.

Changes:

* Updated bundled Test::Unit::Lite to 0.1002.

0.19    2008-10-08      Piotr Roszatycki <dexter@debian.org>

Fixes:

* Don't create package if it is loaded correcly.

Changes:

* Cleaned up "with" method.

* Updated bundled Test::Unit::Lite to 0.1001.

0.18    2008-10-08      Piotr Roszatycki <dexter@debian.org>

New:

* New method "matches" and overloaded operator "~~" are similar to
  "with" method and can be used with new "given" syntax.

  eval { Exception::Base->throw( message => "foo" ) };
  if ($@) {
    my $e = Exception::Base->catch;
    given ($e) {
      when ({ message => "foo" }) { warn "has a foo message"; }
      when ("Exception::Base")    { warn "is an Exception::Base"; }
    }
  }

* The exception class can be created with "import" interface in own package.

  package Exception::My;
  use Exception::Base (__PACKAGE__) =>
    'has' => 'myattr',
  };

* New attribute "stringify_attributes" defines attributes which create
  string returned by stringify method.

  use Exception::Base 'Exception::WithReason' =>
    'has' => 'reason',
    stringify_attributes => ['message', 'reason'],
  };
  eval { Exception::WithReason->(



( run in 0.701 second using v1.01-cache-2.11-cpan-39bf76dae61 )