Michael G Schwern > Test-Simple-1.005000_006 > TB2::BlackHole

Download:
Test-Simple-1.005000_006.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.005000_006   Source  

NAME ^

TB2::BlackHole - Goes Nowhere Does Nothing

SYNOPSIS ^

    use TB2::BlackHole;
    my $blackhole = TB2::BlackHole->new;

    $blackhole->whatever;
    $blackhole->destroy_the_universe( pretty => "please" );

DESCRIPTION ^

This is an object that accepts any method with any argument and returns another BlackHole object. This allows chained black holes like...

    $thing->what->huh->oh;

BlackHole objects are always boolean false so code like this DTRT.

    if( $thing->what ) { ... }

You'd use this if you have an optional object, but don't want everyone to check if they have it. For example, a formatter. This may turn out to be a really bad idea.

syntax highlighting: