---
name: "MooseX::Declare::Syntax::EmptyBlockIfMissing"
section: "3pm"
platform: "linux"
package: "libmoosex-declare-perl"
version: "0.43-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MooseX::Declare::Syntax::EmptyBlockIfMissing"
---

# MooseX::Declare::Syntax::EmptyBlockIfMissing(3pm)

Handle missing blocks after keywords

## NAME

MooseX::Declare::Syntax::EmptyBlockIfMissing - Handle missing blocks after keywords

## VERSION

version 0.43

## DESCRIPTION

The MooseX::Declare::Syntax::NamespaceHandling role will require that the consumer handles the case of non-existent blocks. This role will inject an empty block with only the generated code parts in it.

## METHODS

### handle\_missing\_block

```
  Object->handle_missing_block (Object $context, Str $body, %args)
```

This will inject the generated code surrounded by `"{ ... }"` into the code where the keyword was called.

## SEE ALSO

- •

  MooseX::Declare

- •

  MooseX::Declare::Syntax::NamespaceHandling

## AUTHOR

Florian Ragwitz \<rafl@debian.org\>

## COPYRIGHT AND LICENSE

This software is copyright (c) 2008 by Florian Ragwitz.

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