App-SimpleBackuper

 view release on metacpan or  search on metacpan

local/lib/perl5/Test/Deep.pm  view on Meta::CPAN


  cmp_deeply([ 'a', 'b', 'hello world'], ['a', 'b', re("^hello")]);

will check C<'a' eq 'a'>, C<'b' eq 'b'> but when it comes to comparing
C<'hello world'> and C<re("^hello")> it will see that
$expected_v is an SC and so will pass control to the Test::Deep::Regexp class
by do something like C<< $expected_v->descend($got_v) >>. The C<descend()>
method should just return true or false.

This gives you enough to write your own SCs but I haven't documented how
diagnostics works because it's about to get an overhaul (theoretically).

=head1 EXPORTS

By default, Test::Deep will export everything in its C<v0> tag, as if you had
written:

  use Test::Deep ':v0';

Those things are:

  all any array array_each arrayelementsonly arraylength arraylengthonly bag
  blessed bool cmp_bag cmp_deeply cmp_methods cmp_set code eq_deeply hash
  hash_each hashkeys hashkeysonly ignore Isa isa listmethods methods noclass
  none noneof num obj_isa re reftype regexpmatches regexponly regexpref
  regexprefonly scalarrefonly scalref set shallow str subbagof subhashof
  subsetof superbagof superhashof supersetof useclass

A slightly better set of exports is the C<v1> set.  It's all the same things,
with the exception of C<Isa> and C<blessed>.  If you want to import
"everything", you probably want to C<< use Test::Deep ':V1'; >>.

There's another magic export group:  C<:preload>.  If that is specified, all of
the Test::Deep plugins will be loaded immediately instead of lazily.

=head1 SEE ALSO

L<Test::More>

=head1 THANKS

Thanks to Michael G Schwern for Test::More's is_deeply function which inspired
this library.

=head1 AUTHORS

=over 4

=item *

Fergal Daly

=item *

Ricardo SIGNES <cpan@semiotic.systems>

=back

=head1 CONTRIBUTORS

=for stopwords Alexander Karelas Belden Lyman Daniel Böhmer David Steinbrunner Denis Ibaev Ed Adjei Fabrice Gabolde Felipe Gasper Fergal Daly George Hartzell Graham Knop Ivan Bessarabov José Joaquín Atria Karen Etheridge Kent Fredric Lance Wicks M...

=over 4

=item *

Alexander Karelas <karjala@karjala.org>

=item *

Belden Lyman <blyman@shutterstock.com>

=item *

Daniel Böhmer <dboehmer@cpan.org>

=item *

David Steinbrunner <dsteinbrunner@pobox.com>

=item *

Denis Ibaev <dionys@gmail.com>

=item *

Ed Adjei <edmund@cpan.org>

=item *

Fabrice Gabolde <fabrice.gabolde@gmail.com>

=item *

Felipe Gasper <felipe@felipegasper.com>

=item *

Fergal Daly <fergal@esatclear.ie>

=item *

George Hartzell <hartzell@alerce.com>

=item *

Graham Knop <haarg@haarg.org>

=item *

Ivan Bessarabov <ivan@bessarabov.ru>

=item *

José Joaquín Atria <jjatria@cpan.org>

=item *

Karen Etheridge <ether@cpan.org>

=item *

Kent Fredric <kentfredric@gmail.com>

=item *

Lance Wicks <lancew@cpan.org>

=item *

Matthew Horsfall <wolfsage@gmail.com>

=item *

Michael Hamlin <myrrhlin@gmail.com>

=item *

Mohammad S Anwar <mohammad.anwar@yahoo.com>

=item *

Peter Haworth <peter.haworth@headforwards.com>

=item *

Philip J. Ludlam <p.ludlam@cv-library.co.uk>

=item *

Ricardo Signes <rjbs@semiotic.systems>



( run in 0.444 second using v1.01-cache-2.11-cpan-d7f47b0818f )