POE::Component::Generic::ObjectA POE component that provides non-blocking access to a blocking object. | |
Download |
POE::Component::Generic::Object Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Philip Gwyn
- Publisher web site:
- http://search.cpan.org/~gwyn/
POE::Component::Generic::Object Tags
POE::Component::Generic::Object Description
A POE component that provides non-blocking access to a blocking object. POE::Component::Generic::Object is a POE component that provides non-blocking access to a blocking object.SYNOPSIS use POE::Component::Generic; my $generic = POE::Component::Generic->new( package=>'Builder', factories=> ); $generic->build( {event=>'created_foo'}, 'foo' ); # Note that this happens in a child process sub Builder::build { my( $package, $arg ) = @_; return bless { something=>$arg }, 'Other::Package'; } # in the event "created_foo" # Note that this happens in the parent process sub create_foo { my( $resp, $foo ) = @_; die $resp->{error} if $resp->{error} # $foo is a proxy object to what Builder::build returned my $objID = $foo->object_id; # Unique ID of the object $foo->vibble( {}, @args ); # call a method on the object foo $foo->yield( 'vibble', {}, @args ); # same as above $foo->call( 'vibble', {}, @args ); # same as above $generic->vibble( {obj=>$objID}, @args ); # same as above } Requirements: · Perl
POE::Component::Generic::Object Related Software