> My nice cross-platform perl script that used to do
> 
>      checkout("foo");
>       process("foo");
> 
> becomes
> 
>      checkout("foo");
>      $foo_ending = get_line_ending_attribute("foo");
>      $platform_ending = get_platform_line_ending();
>      if ($foo_ending == CRLF && $platform_ending == LF) {
>           dos_to_unix("foo");
>      } else if ($foo_ending == LF && $platform_ending == CRLF) {
>           unix_to_dos("foo");
>      if ($foo_ending == CR && $platform_ending == LF) {
>           mac_to_unix("foo");
>      } else if ($foo_ending == LF && $platform_ending == CR) {
>           unix_to_mac("foo");
>      if ($foo_ending == CR && $platform_ending == CRLF) {
>           mac_to_dos("foo");
>      } else if ($foo_ending == CRLF && $platform_ending == CR) {
>           unix_to_mac("foo");
>      }
>      process("foo");
> 
> No thanks.
> 
> Peter.
> 
> 
consider:
      checkout("foo");
      $foo_ending = get_line_ending_attribute("foo");
      $platform_ending = get_platform_line_ending();
      fix_endings( "foo", $foo_ending, $platform_ending );
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006