Commits

Toby Inkster  committed 1560915 Draft

underscore for private function

  • Participants
  • Parent commits 6f3cfc8
  • Tags 0.005

Comments (0)

Files changed (1)

File lib/IO/Detect.pm

 use Carp qw<croak>;
 use URI::file;
 
-sub subpt (&;$)
+sub _subpt (&;$)
 {
 	my ($code, $proto) = @_;
 	$proto =~ s/_/\$/g if $] < 5.010;
 {
 	my ($class, $name, $arg) = @_;
 	my $methods = $arg->{methods};
-	return subpt { _ducktype((@_?shift:$_), $methods) } '_';
+	return _subpt { _ducktype((@_?shift:$_), $methods) } '_';
 }
 
 my $expected_methods = [
 	qw(close eof fcntl fileno getc getline getlines ioctl read print stat)
 ];
-*is_filehandle = subpt
+*is_filehandle = _subpt
 {
 	my $fh = @_ ? shift : $_;
 	
 	!! ( $_[0] !~ /\r?\n|\r/s )
 }
 
-*is_filename = subpt
+*is_filename = _subpt
 {
 	my $f = @_ ? shift : $_;
 	return true if blessed $f && $f->DOES('IO::All');
 	return;
 } '_';
 
-*is_fileuri = subpt
+*is_fileuri = _subpt
 {
 	my $f = @_ ? shift : $_;
 	return $f if blessed $f && $f->DOES('URI::file');
 	my ($class, $name, $arg) = @_;
 	my $default_mode = $arg->{mode} || '<';
 	
-	return subpt
+	return _subpt
 	{
 		my $f = @_ ? shift : $_;
 		return $f if is_filehandle($f);