$resource = $ARGV[0];
my ( $pattern, $replacement ) = ( split '!', $rr->regexp )[ 1, 2 ];
- print "$pattern, $replacement\n";
- unless ( $resource =~ s/$pattern/$replacement/ ) {
- $A->verbose( "Unable to apply regexp to $ARGV[0]", 4 );
- }
+ $replacement =~ s/\@/\\\@/;
+ $resource =~ s/^\+//;
+ $A->verbose( "$pattern, $replacement", 4 );
+ my $regexp = "\$resource =~ s/$pattern/$replacement/";
+ eval "$regexp";
+ $A->verbose( "new resource: $resource", 4 );
$resource =~ s/^(\w+):/\U$1\//;
$records{$count} =
{ preference => $rr->preference, resource => $resource };