Commits

Anonymous committed a87dcfc

Extracted the ->_sprintf() method for easy over-ridability.

Comments (0)

Files changed (1)

modules/Text-Sprintf-Named/lib/Text/Sprintf/Named.pm

     }
     else
     {
-        return sprintf(("%" . $args->{conv_prefix} . $args->{conv_letter}),
+        return $self->_sprintf(
+            ("%" . $args->{conv_prefix} . $args->{conv_letter}),
             $args->{named_params}->{$args->{name}}
         );
     }
 }
 
+sub _sprintf
+{
+    my ($self, $format, @args) = @_;
+
+    return sprintf($format, @args);
+}
+
 =head1 EXPORT
 
 A list of functions that can be exported.  You can delete this section