Suppress warnings for patterns.

This seems to be triggered when the attribute is not set or some
corner case when the value passed is undef (this latter couldn't be
reproduced).
Use Test::Warnings instead of local $SIG{__WARN__}
Merge pull request #60 from melmothx/topic/fix-undef-warnings-in-patterns

Suppress warnings for patterns.