[dancer-users] unable to install Dancer::Session::Cookie

David Golden xdg at xdg.me
Fri Jul 5 21:37:07 BST 2013

On Fri, Jul 5, 2013 at 2:48 PM, Naveed Massjouni <naveedm9 at gmail.com> wrote:
> Can you explain what you mean when you say open creates objects? I am
> running 5.14 and when I run:
>     perl -E 'open $x, "foo"; say ref $x'
> It prints "GLOB".

The IO slot of the GLOB holds an IO::File object:

$ perl -wE 'open my $fh, ">", "foo.txt"; say ref( *{$fh}{IO} )'

At least as of Perl v5.12, anyway -- before that the IO slot could be
a FileHandle or an IO::Handle, IIRC.  However, even now Perl doesn't
actually load IO::File, it merely blesses.  In Perl v5.14, I added a
feature to automatically load IO::File on demand if you try to call a
method on a file handle.  Previously, it just died.


David Golden <xdg at xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg

More information about the dancer-users mailing list