The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Promises6::Util - internal utils

VERSION

version 0.003

SYNOPSIS

  use Evo::Base -strict;
  use Promises6::Util qw(is_promise is_thenable);

  my $object;
  my $is_promise  = is_promise($object);
  my $is_thenable = is_thenable($object);

METHODS

is_promise

  Returns true if argument is a promise object by checking if it's a
  subclass of L<Promises6::Promise>. Returns false otherwise

is_thenable

  Returns true if an argument is a blessed object with C<then> method.
  Returns false otherwise

CONST

Represent internal states

  • PENDING

  • FULFILLED

  • REJECTED

  • PROGRESS

AUTHOR

alexbyk <alexbyk.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by alexbyk.

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