sub method { my( $self, @args ) = @_; ... if( $self->_pipeExistsAndIsGood ) { ## communicate with pipe } else { ## $self->_forkAndStorePipe(); } }