The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Role::Declare::StrictWith - conditional role composition

SYNOPSIS

    package My::New::Role;
    use Role::Declare::StrictWith;

    with_strict 'My::New::Interface';

Which is equivalent to:

    package My::New::Role;
    use Role::Tiny::With;;
    use Devel::StrictMode;

    with 'My::New::Interface' if STRICT;

DESCRIPTION

WARNING: This module is deprecated in favour of Role::Declare::Should.

This module provides with_strict - a version of Role::Tiny::With's with which only works when Devel::StrictMode is on. If STRICT is not enabled, with_strict is a no-op.

AUTHOR

Szymon Nieznański <snieznanski@perceptyx.com>

LICENSE

'Role::Declare' is Copyright (C) 2020, Perceptyx Inc

This library is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

This package is distributed in the hope that it will be useful, but it is provided "as is" and without any express or implied warranties.

For details, see the full text of the license in the file LICENSE.