On Tue, Dec 16, 2008 at 7:04 AM, jason switzer wrote:
> I hadn't seen a Nameable role mentioned yet, so I wasn't able to understand
> any such concept.
The list was not meant to be exhaustive. There are a lot more roles
that have something to do with IO but were missing: Asynchronous IO,
Datagram
On Tue, 16 Dec 2008, jason switzer wrote:
You can already easily mix it in using 'does':
$fstab = open('/etc/fstab', :r);
$fstab does WhitespaceTrim;
I don't think it's really necessary to include that into open(),
though it might be useful syntactic sugar.
I haven't spent the time to unders
On Mon, Dec 15, 2008 at 6:59 PM, Leon Timmermans wrote:
> On Mon, Dec 15, 2008 at 6:42 PM, jason switzer wrote:
> > It's lazy and kinda cheating, but for small simple tasks, it gets the job
> > done. I'm not up to speed with the IO spec, but a sort of auto-slurp
> > functionality would be nice.
On Mon, Dec 15, 2008 at 6:42 PM, jason switzer wrote:
> It's lazy and kinda cheating, but for small simple tasks, it gets the job
> done. I'm not up to speed with the IO spec, but a sort of auto-slurp
> functionality would be nice. Something to the effect:
>
> @data = :slurp("mydatafile.txt");
A
Leon Timmermans wrote:
On Mon, Dec 15, 2008 at 5:43 PM, Richard Hainsworth
wrote:
a) I am fed up with writing something like
open(FP, ">${fname}_out.txt") or die "Cant open ${fname}_out.txt for
writing\n";
The complex definition of the filename is only to show that it has to be
restated ident
> "LT" == Leon Timmermans writes:
>> e) When dealing with files in directories in perl5 under linux, I need
>>
>> opendir(DIR,'./path/') or die "cant open ./path/\n";
>>
>> my @filelist = grep { /^.+\.txt/ } readdir(DIR);
>>
>> I would prefer something like
>>
>> my Loca
On Mon, Dec 15, 2008 at 5:43 PM, Richard Hainsworth
wrote:
> Following the request for ideas on IO, this is my wish list for working with
> files. I am not a perl guru and so I do not claim to be able to write
> specifications. But I do know what I would like.
>
> The organisation of the IO as rol
On Mon, Dec 15, 2008 at 10:43 AM, Richard Hainsworth
wrote:
> a) I am fed up with writing something like
>
> open(FP, ">${fname}_out.txt") or die "Cant open ${fname}_out.txt for
> writing\n";
>
> The complex definition of the filename is only to show that it has to be
> restated identically twice.
Following the request for ideas on IO, this is my wish list for working
with files. I am not a perl guru and so I do not claim to be able to
write specifications. But I do know what I would like.
The organisation of the IO as roles seems to be a great idea. I think
that what is suggested here