# Special Argument $mime_type = $producer->foo(undef, @args); $producer->foo($fh, @args); # Explicit Context # wantarray is false versus wantarray is undefined # When wantarray is false we return an object with a # mime_type method. $mime_type = $producer->foo(@args)->mime_type; $producer->foo(@args); # Implicit Context # wantarray is false versus wantarray is undefined # When wantarray is false we return the MIME-Type directly. $mime_type = $producer->foo(@args); $producer->foo(@args); # Callback # This would have to be augmented with the use of threads # to really work my $mime_type; $producer->foo(sub { $mime_type = $_[0] }, @args); # Special method $mime_type = $producer->foo_mime_type(@args); $producer->foo(@args); # Double-call (very bad idea, but it's a brainstorm) select $null_fh; $mime_type = $producer->foo(@args); select $real_fh; $producer->foo(@args); # Documents as objects $document = $producer->foo(@args); $mime_type = $document->mime_type; $document->render;