Previously I had posted that I could not get HTML::Mason to install onto a CentOS 6.4 box. While there's a pre-built package for it on repoforge, that package doesn't install using yum because of a dependency on Log::Any. No repository that I could find had a pre-build Log::Any. Installing Log::Any via CPAN doesn't work because yum doesn't know that you've installed it and still fails the dependency check when installing HTML::Mason.

Many people gave excellent suggestions, but they didn't work for me for a variety of reasons. Although I am immensely grateful for the replies because without the clues they gave, I would never have figured it out! What I decided to ultimately do is create a .rpm file for Log::Any, install it using rpm and then that should allow HTML::Mason to install. This approach does, in fact, work.

So, just to document what I did, I'm making this post. First, you install and configure the rpm environment:

yum install rpm-build yum install redhat-rpm-config mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros

Next, create a .spec file in the rpmbuild/SPECS directory. I called mine perl-Log-Any.spec. I found one for Log::Any in the repoforge github project. It's not merged into the project yet, but you can look at the file. There's a syntax error in the file, but here's the corrected version, as far as I can tell:

%{!?perl_vendorlib: %define perl_vendorlib %(eval "`%{__perl} -V:insta +llvendorlib`"; echo $installvendorlib)} Name: perl-Log-Any Version: 0.15 Release: 1%{?dist} Summary: Bringing loggers and listeners together License: GPL+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Log-Any/ Source0: http://www.cpan.org/modules/by-module/Log/Log-Any-%{ve +rsion}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__i +d_u} -n) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) %description Log::Any allows CPAN modules to safely and efficiently log messages, w +hile letting the application choose (or decline to choose) a logging mechan +ism such as Log::Dispatch or Log::Log4perl. %prep %setup -q -n Log-Any-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \; find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} $RPM_BUILD_ROOT/* %check make test %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc Changes LICENSE META.json README tidyall.ini %{perl_vendorlib}/* %{_mandir}/man3/* %changelog * Thu Jul 18 2013 Christopher J Kucera <pez@apocalyptech.com> 0.15-1 - Specfile autogenerated by cpanspec 1.78.

Then use wget to place the Log::Any sources into the SOURCES folder:

cd rpmbuild/SOURCES wget http://www.cpan.org/modules/by-module/Log/Log-Any-0.15.tar.gz

Change back into the rpmbuild/SPECS folder and build the .rpm:

rpmbuild -ba perl-Log-Any.spec

You now have a shiny new .rpm file for Log::Any. I installed it using:

rpm -i perl-Log-Any-0.15-1.el6.noarch.rpm

So there you go. There's my solution to getting HTML::Mason installed to the default Perl interpreter on CentOS 6. Thanks again to the responses I got!


In reply to Installing HTML::Mason on CentOS 6 Resolved by marmotking

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.