Commits

Toby Inkster committed 8fa0782 Draft

reimplement _oneline

Comments (0)

Files changed (2)

 
 BEGIN {
 	$IO::Detect::AUTHORITY = 'cpan:TOBYINK';
-	$IO::Detect::VERSION   = '0.002';
+	$IO::Detect::VERSION   = '0.003';
 }
 
 use Sub::Exporter -setup => {
 
 sub _oneline ($)
 {
-	my @bits = split /\r?\n|\r/, shift;
-	!!(@bits==1);
+	!! ( $_[0] !~ /\r?\n|\r/s )
 }
 
 sub is_filename (_)

meta/changes.pret

 		item "Export configurable ducktype function."^^Addition;
 	].
 
+`IO-Detect 0.003 cpan:TOBYINK`
+	issued  2012-07-10;
+	changeset [
+		item "Re-implementation of IO::Detect::_oneline."^^Bugfix;
+	].