Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Shouldn't enc2xs always be included as part of Encode?

by BeneSphinx (Sexton)
on Oct 04, 2017 at 23:08 UTC ( #1200696=perlquestion: print w/replies, xml ) Need Help??
BeneSphinx has asked for the wisdom of the Perl Monks concerning the following question:

Given the hierarchical nature of the listing in CPAN, I would think that enc2xs is always included in Encode, and therefore is always included in every Perl distribution.

However, it seems this is not the case. I am deploying a Perl app on Heroku, which to make a long story short means I have an application using System perl on these boxes. The system is RHEL 7. On this system, enc2xs is not found: It isn't in the filesystem as far as I can tell (using find), and the command isn't available from the commandline.

Contrast this with my laptop, where I am running Windows and have Strawberry Perl. On this laptop, enc2xs is a recognized command.

So I guess my question is: Given that enc2xs wasn't included, what do you think the best way of getting it is?

  • Comment on Shouldn't enc2xs always be included as part of Encode?

Replies are listed 'Best First'.
Re: Shouldn't enc2xs always be included as part of Encode?
by choroba (Bishop) on Oct 05, 2017 at 07:49 UTC
    In RedHat up to 7, core perl is different to core perl anywhere else. See Redhat perl != perl for details. Install the package perl-core to get the full installation.

    There's good news, though. They're going to fix it.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: Shouldn't enc2xs always be included as part of Encode?
by hippo (Abbot) on Oct 05, 2017 at 08:25 UTC

    Further to choroba's reply, the specific RHEL7 package for Encode is perl-Encode and for enc2xs is perl-Encode-devel. You can install these individually but if you install perl-core instead you will only get perl-Encode, AIUI.

Re: Shouldn't enc2xs always be included as part of Encode?
by BeneSphinx (Sexton) on Oct 05, 2017 at 00:20 UTC

    In the end, I was able to solve this problem by explicitly installing Encode before processing the other dependencies in the cpanfile. I'm still not sure why enc2xs wasn't present earlier even though Encode was, but I'm glad to have it working.

Re: Shouldn't enc2xs always be included as part of Encode?
by Anonymous Monk on Oct 05, 2017 at 01:40 UTC

    Hi,

    Is this a system perl?

    Encode is core a long time and enc2xs comes with perl since 2002-Mar-05 ... but some operating systems don't distribute perl, they remove core files ... some make them available in a -dev package

Re: Shouldn't enc2xs always be included as part of Encode?
by sundialsvc4 (Abbot) on Oct 06, 2017 at 12:45 UTC

    Although PHP (and quite out of necessity, I would add ...) is much more “modularized” by (Linux) distros these days, Perl also is divided-up by many distros and sometimes there doesn’t seem to be too much reason to it.   Even so-called “core” facilities can be affected.   In the Ubuntu distro, for instance, here’s a very small subset of the available (Ubuntu) packages which, in one way or another, deal with Perl and encoding:

    libencode-locale-perl - utility to determine the locale encoding crip - terminal-based ripper/encoder/tagger tool libbencode-perl - Perl module for BitTorrent serialisation format libcatmandu-importer-getjson-perl - load JSON-encoded data from a serv +er using a GET HTTP request libdbix-class-encodedcolumn-perl - extension to encode column values a +utomatically libencode-arabic-perl - perl implementation for Arabic encodings libencode-detect-perl - Encode::Encoding subclass that detects the enc +oding of data libencode-eucjpms-perl - Perl library for Microsoft Compatible Japanes +e Encodings libencode-hanextra-perl - perl module providing extra sets of Chinese +character encodings libencode-imaputf7-perl - modification of UTF-7 encoding for IMAP libencode-jis2k-perl - perl module providing JIS X 0212 (aka JIS 2000) + Encodings libencode-perl - module providing interfaces between Perl's strings an +d the system libencode-zapcp1252-perl - zap Windows Western gremlin characters libgrabcd-readconfig-perl - rip and encode audio CDs - common files libhtml-html5-entities-perl - module to encode and decode character en +tities defined in HTML5 libidna-punycode-perl - module to encode Unicode string in Punycode libimager-qrcode-perl - Generate QR code with Imager using libqrencode liblatex-encode-perl - Perl module to encode characters for LaTeX form +atting libmail-verp-perl - Variable Envelope Return Paths (VERP) address enco +der/decoder libmarc-parser-raw-perl - parser for ISO 2709 encoded MARC records libmarc-xml-perl - Perl library to access MARC data encoded as XML libmime-base32-perl - Base32 encoder/decoder libmime-encwords-perl - Perl interface to deal with RFC 2047 encoded w +ords libnet-idn-encode-perl - Internationalizing Domain Names in Applicatio +ns (IDNA) libnumber-recordlocator-perl - Perl module that encodes integers into +a short "locator string" libsereal-encoder-perl - fast, compact, powerful binary serialization +module libsession-storage-secure-perl - module implementing a secure way to e +ncode session data libtex-encode-perl - Perl module to transform UTF-8 strings into TeX libtext-csv-encoded-perl - encoding-aware comma-separated values manip +ulator liburi-encode-perl - Perl module to encode and decode strings to URIs

    So, these are things which affect both Perl and CPAN but do so in ways that neither of them per se entirely knows about.   And, different distro packagers, each operating independently, inevitably made different decisions about what to put where.   Although they try very hard to correctly handle dependencies, mistakes do get made.

    Comment:   In some cases, I dealt with this problem by treating it like the “install Perl on a shared-hosting system” use-case, by creating an application-specific CPAN library and installing modules there, pointing each application to its own CPAN repository when it runs, and thereby insulating them (somewhat) from what is installed at the system (Ubuntu-package) level and from other applications which were running on the same environment at the same time.   (This was to deal with a particularly-messy mash-up of legacy applications that were being ported to Linux from something else.   This slightly-helped the team to deal with each of them one-at-a-time.)   In other cases, I simply made good use of the distro-provided facilities that let me extract a package-list from one machine and automatically synchronize it to others.

      Given the amiable, breezy nature of the commentary it might seem odd that it's downvoted, even malicious or personal. It has been said so and I expect will again.

      To put that to rest: when this answer is read for comprehension and stripped of everything irrelevant to the original question—all the semantic fugu deflated—it reads–

      You never can tell and mistakes happen. I solved this with Perl. Sometimes system tools.

        With a little elbow grease you could make that into a haiku. Or something from horse_ebooks (rip)

        Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

        You never can tell and mistakes happen. I solved this with Perl. Sometimes system tools.

        it actually means i paid for a solution (It is spampoop)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1200696]
Approved by beech
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-12-18 05:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (467 votes). Check out past polls.

    Notices?