I'm confused by your post. Breaking down qr/Foo::Bar(?!\s+\()/ we get: Foo::Bar # literal 'Foo::Bar'
(?! # start of negative look-ahead
\s+ # one or more white space chars
\( # literal opening bracket
) # end of negative look-ahead
so to answer your reply, I believe I provided the literal ( after the \s*.
To answer your other statement, that something such as "Foo::Bar is my favourite module" should match, I agree - that is how I read the initial requirement from the thread. In which case my answer of using \s+ kept within the spirit of the original statements made by the thread author. However I wanted to keep my example in line with the example that the author had tried, hence the use of the literal (. Hope this clears up my answer. |