File universal-can.patch of Package perl-HTML-Format

---
 lib/HTML/Formatter.pm |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Index: HTML-Format-2.04/lib/HTML/Formatter.pm
===================================================================
--- HTML-Format-2.04.orig/lib/HTML/Formatter.pm
+++ HTML-Format-2.04/lib/HTML/Formatter.pm
@@ -107,7 +107,6 @@ use HTML::Element 3.15 ();
 
 use strict;
 use Carp;
-use UNIVERSAL qw(can);
 
 use vars qw($VERSION @Size_magic_numbers);
 $VERSION = sprintf("%d.%02d", q$Revision: 2.04 $ =~ /(\d+)\.(\d+)/);
@@ -207,7 +206,7 @@ sub format
     my($self, $html) = @_;
 
     croak "Usage: \$formatter->format(\$tree)"
-     unless defined $html and ref $html and can($html, 'tag');
+     unless defined $html and ref $html and $html->can('tag');
 
     if( $self->DEBUG() > 4 ) {
       print "Tree to format:\n";
@@ -228,9 +227,9 @@ sub format
 	    if (ref $node) {
 		$tag = $node->tag;
 		$func = $tag . '_' . ($start ? "start" : "end");
-		# Use UNIVERSAL::can so that we can recover if
+		# Use ->can so that we can recover if
 		# a handler is not defined for the tag.
-		if (can($self, $func)) {
+		if ($self->can($func)) {
 		    DEBUG > 3 and print '  ' x $depth, "Calling $func\n";
 		    return $self->$func($node);
 		} else {
openSUSE Build Service is sponsored by