--- Net-FCP/FCP.pm 2004/05/14 16:12:26 1.30 +++ Net-FCP/FCP.pm 2004/05/14 16:28:20 1.31 @@ -79,6 +79,7 @@ no warnings; use Net::FCP::Metadata; +use Net::FCP::Util qw(tolc touc xeh); our $EVENT = Net::FCP::Event::Auto::; @@ -94,26 +95,6 @@ die $@ if $@; } -sub touc($) { - local $_ = shift; - 1 while s/((?:^|_)(?:svk|chk|uri)(?:_|$))/\U$1/; - s/(?:^|_)(.)/\U$1/g; - $_; -} - -sub tolc($) { - local $_ = shift; - 1 while s/(SVK|CHK|URI)([^_])/$1\_$2/i; - 1 while s/([^_])(SVK|CHK|URI)/$1\_$2/i; - s/(?<=[a-z])(?=[A-Z])/_/g; - lc $_; -} - -# the opposite of hex -sub xeh($) { - sprintf "%x", $_[0]; -} - =item $fcp = new Net::FCP [host => $host][, port => $port][, progress => \&cb] Create a new virtual FCP connection to the given host and port (default