in reply to Re^3: Parsing an email
in thread Parsing an email

Not sure but you might check that you actually installed the module. This needs a C library and the File::LibMagic module on top of that and when I tried installing and I had to force the install because that prerequisite module's tests failed (OS X, perl 5.34.0; so not necessarily the same as your problem since you look to be on windows).

That being said as soon as I'd forced the prerequisite and got Courriel itself to install a perldoc Courriel worked fine (the documentation is embedded in the module's .pm source). You also can follow that link to CPAN and read the documentation online there.

Edit: Just to clarify: I did a brew install libmagic and got the C library, but even after doing that I got errors from File::LibMagic's tests when it went to install and I had to cpanm --force File::LibMagic. I haven't tried to use either it or Courriel past doing perldoc Courriel so I have no clue if I've got a huge basket of broked or not.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^5: Parsing an email
by BernieC (Pilgrim) on Jan 10, 2022 at 19:26 UTC
    That seems to be it. I didn't watch the install carefully enought {sigh} and it tells me:
    This module requires the libmagic.so library and magic.h header. See INSTALL.md for more details on installing these.
    I expect/hope after i get that fixed it'll install properly
Re^5: Parsing an email
by BernieC (Pilgrim) on Jan 10, 2022 at 19:53 UTC
    OK. I've pawed through the distro and, as warned, I've run headlong into
    Installing File-LibMagic Installing File-LibMagic requires that you have the *libmagic.so* libr +ary and the *magic.h* header file installed.
    But it doesn't say *HOW*. I did a web search and I was only able to find libmagic.so for various Unix versions. Nothing for windows. and some more poking around {since I didn't know what a .so file is} tells me
    What is a SO file? An SO file is a shared library used by programs ins +talled on the Linux and Android operating systems. It contains common + program functions and logic that multiple programs require access to +.
    I'm guessing that that likely means you can't run Corriel on Windows. sigh... I'll give Mail::Box another look.

      This might be useful, although the instruction to drop files into C:\Windows\System32 is not something I would follow.

      https://github.com/hey-red/Mime/issues/9

      Update: Although there is an Alien package Alien::LibMagic which will get you the DLL to link against when compiling File::LibMagic.

      Update 2: ...although compilation of libmagic needs libgnurx so the Alien does not work on my Windows machine. One could develop an Alien::libgnurx but I suspect that would simply be the start of a journey down a rabbit hole of dependencies...

      Ew. Yeah no clue, don't really do windows (especially not building stuff there; if I do I use cygwin which is back to *NIX-y stuff). Did find https://github.com/nscaife/file-windows which looks to maybe be a port of the library that has a DLL version (which would be what you'd need on wintendo rather than an shared object ".so" file) but . . . /shrug

      So yeah Mail::Box may be the simpler route at this point if it installs cleaner for you.

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.