Acme::Coro::Suke - the only real corosuke in benzo


Acme-Coro-Suke documentation Contained in the Acme-Coro-Suke distribution.

Index


Code Index:

NAME

Top

Acme::Coro::Suke - the only real corosuke in benzo

SYNOPSIS

Top

  use Coro;
  use Acme::Coro::Suke;

  benzo {
      print "コロ助君、ワス幸せっス\n";
      cede;
      print "・・・\n";
  };

  print "1\n";
  cede; # inside to benzo
  print "2\n";
  cede; # and again




DESCRIPTION

Top

This module emulate to corosuke x benzo.

AUTHOR

Top

Masahiro Chiba <chiba@geminium.com>

SEE ALSO

Top

LICENSE

Top

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


Acme-Coro-Suke documentation Contained in the Acme-Coro-Suke distribution.

package Acme::Coro::Suke;
use strict;
use warnings;
use utf8;
our $VERSION = '0.01';

use Coro;
use Encode;
use base qw/Exporter/;
our @EXPORT = qw/benzo/;

our $SERIF = Encode::encode('utf-8', "うわぁ…べんぞうさんの中…すごくあったかいナリぃ… \n");

sub benzo(&) { ##
    my $sub = shift;
    async {
        Coro::on_enter {
            print $SERIF;
        };
        $sub->();
    };
}


1;
__END__