X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Model-DBIC-Schema.git;a=blobdiff_plain;f=t%2F08helper.t;h=27df3551c026ece7e2d6e1e3c5deda42402e2a6d;hp=748242efe1998b15cf06c919e6272309d302689c;hb=170e297127d6add9aac6a667b88fe06f58a46776;hpb=9899ff6619ca9686a3a3b6fb353e2c9597d9abf7 diff --git a/t/08helper.t b/t/08helper.t index 748242e..27df355 100644 --- a/t/08helper.t +++ b/t/08helper.t @@ -73,11 +73,12 @@ $i = instance(args => [$static, q{components=TimeStamp,Foo}]); is_deeply $i->components, ['InflateColumn::DateTime', 'TimeStamp', 'Foo'], 'two extra components'; +my $flags = qr// =~ /\^/ ? '^' : "-xism"; $i = instance(args => [$static, q{constraint=^(foo|bar)$}]); is $i->loader_args->{constraint}, qr/^(foo|bar)$/, 'constraint loader arg'; is $i->helper->{loader_args}{constraint}, - q{qr/(?-xism:^(foo|bar)$)/}, + qq{qr/(?$flags:^(foo|bar)\$)/}, 'constraint loader arg as string'; $i = instance(args => [$static, q{exclude=^(foo|bar)$}]);