Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the IO-All CPAN distribution.

Report information
The Basics
Id: 12175
Status: rejected
Priority: 0/
Queue: IO-All

People
Owner: Nobody in particular
Requestors: adam.clarke [...] strategicdata.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.33
Fixed in: (no value)



Subject: Copy file to directory does not DWIM
Show quoted text
> perl -MIO::All -e'print "IO::All ", $IO::All::VERSION, "\n";'
IO::All 0.33 Show quoted text
> perl -v
This is perl, v5.8.4 built for i386-linux-thread-multi Show quoted text
> uname -a
Linux thuathail 2.6.10-5-686 #1 Tue Apr 5 12:27:02 UTC 2005 i686 GNU/Linux See attached script for working example of "DWIM" issue and my workaround.
#!/usr/bin/perl use IO::All; $test_file = io('test-file') < "This is contained in test-file\n"; $test_dir = io('test-dir')->mkpath; # This works. $test_file > io('test-file-2'); # This does not. Should work like 'cp test-file test-dir' but ... # Can't locate object method "print" via package "IO::Dir" at /usr/share/perl5/IO/All.pm line 622. eval { $test_file > $test_dir; }; warn $@; # This is workaround and maybe part of solution. $test_file > io($test_dir . '/' . $test_file->filename);
io('test_file') > io(test_dir); Results in error .. Can't locate object method "print" via package "IO::Dir" at /usr/share/perl5/IO/All.pm line 622. Should work like the below for DWIMness. cp test-file > test_dir At least I thought it should :)