Mailing List Archive

strftime not found
Hello,

I'm installing a new instance of Bricolage and I'm getting an error when I try to Publish.

Here is the error:
Undefined subroutine &Bric::Util::Burner::Commands::strftime called at /usr/local/bricolage/data/burn/comp/oc_1026/partners/video/unicorn/cover.mc line 3.

Here is line 3 in the template code:
my $build_date = strftime( "%a, %d %b %Y %H:%M:%S -0800", localtime() );

Here is my PERL_LOADER setting in bricolage.conf
PERL_LOADER = use HTML::Entities; use Bric::Util::Burner qw(:modes); use POSIX; use Bric::Util::Time ':all'; use HTTP::Date;

strftime is part of the POSIX package. As you can see, POSIX is used for all templates, but when publishing it's looking for strftime in Bric::...Commands instead of POSIX. What am I missing?

Thanks,
Mike Fletcher
Re: strftime not found [ In reply to ]
On May 26, 2010, at 10:32 AM, Fletcher, Michael wrote:

> Here is my PERL_LOADER setting in bricolage.conf
> PERL_LOADER = use HTML::Entities; use Bric::Util::Burner qw(:modes); use POSIX; use Bric::Util::Time ':all'; use HTTP::Date;
>
> strftime is part of the POSIX package. As you can see, POSIX is used for all templates, but when publishing it's looking for strftime in Bric::...Commands instead of POSIX. What am I missing?

Try:

PERL_LOADER = use HTML::Entities; use Bric::Util::Burner qw(:modes); use POSIX qw(strftime); use Bric::Util::Time ':all'; use HTTP::Date;

That will export strftime into the Bric::...Commands package.

Best,

David
RE: strftime not found [ In reply to ]
On May 26, 2010 10:52 AM, David E. Wheeler wrote:

> Try:
>
> PERL_LOADER = use HTML::Entities; use Bric::Util::Burner qw(:modes);
> use POSIX qw(strftime); use Bric::Util::Time ':all'; use HTTP::Date;
>
> That will export strftime into the Bric::...Commands package.


No difference. My site perl is installed here:
/usr/lib/perl5/site_perl/
And there is a folder here:
/usr/lib/perl5/site_perl/5.8.8/Bric/Util/Burner
But there is nothing there called Commands or POSIX or strftime.

I'm not clear on how Bricolage knows where site_perl is, but maybe that's not important for me to understand :)

Thanks,
Mike
Re: strftime not found [ In reply to ]
On Wed, May 26, 2010 at 7:32 PM, Fletcher, Michael
<michael.fletcher@cbs.com> wrote:
> I'm installing a new instance of Bricolage and I'm getting an error when I try to Publish.
>
> Here is the error:
> Undefined subroutine &Bric::Util::Burner::Commands::strftime called at
> /usr/local/bricolage/data/burn/comp/oc_1026/partners/video/unicorn/cover.mc line 3.
....
> Here is my PERL_LOADER setting in bricolage.conf
> PERL_LOADER = use HTML::Entities; use Bric::Util::Burner qw(:modes); use POSIX;
> use Bric::Util::Time ':all'; use HTTP::Date;

During publishing, it's probably being run by bric_queued,
which is a cronjob or daemon running outside of mod_perl (are previews
working?),
and I think PERL_LOADER isn't loaded by bric_queued (without welcome patches).
Re: strftime not found [ In reply to ]
On May 26, 2010, at 12:03 PM, lannings@gmail.com wrote:

> During publishing, it's probably being run by bric_queued,
> which is a cronjob or daemon running outside of mod_perl (are previews
> working?),
> and I think PERL_LOADER isn't loaded by bric_queued (without welcome patches).

If it isn't, it's a bug. I'm pretty sure it is loaded.

Best,

David
RE: strftime not found [ In reply to ]
On Wednesday, May 26, 2010 12:10 PM, David E. Wheeler wrote:


>> During publishing, it's probably being run by bric_queued, which is a
>> cronjob or daemon running outside of mod_perl (are previews working?),
>> and I think PERL_LOADER isn't loaded by bric_queued (without welcome patches).

>If it isn't, it's a bug. I'm pretty sure it is loaded.

I have the same version of Bric running on two other servers,
both using bric_queued, both with the same PERL_LOADER value,
and they both work ok. But I will check my bric_queued setup
and permissions...

Mike
RE: strftime not found [ In reply to ]
The best I can tell, the setup of /etc/init.d/bric_queued.sh is setup exactly the same on all servers, so I'm still at square-one.

Thanks,
Mike
RE: strftime not found [ In reply to ]
If I set QUEUE_PUBLISH_JOBS = No (instead of Yes), then the error goes away.
Re: strftime not found [ In reply to ]
On May 26, 2010, at 2:39 PM, Fletcher, Michael wrote:

> If I set QUEUE_PUBLISH_JOBS = No (instead of Yes), then the error goes away.

What version of Bricolage? This does sound like the issue Scott mentioned.

Best,

David
RE: strftime not found [ In reply to ]
On Wednesday, May 26, 2010 2:44 PM, David E. Wheeler wrote:

> What version of Bricolage? This does sound like the issue Scott mentioned.

Uh oh. I knew this would eventually come up. 1.10.2
But I will be upgrading. I just need the two systems to have the same version at first. Please don't scold me or tell me "just upgrade" :) The problem does not exist on another system with the same version of Bric, so there must be a fix.

Thanks,
Mike
Re: strftime not found [ In reply to ]
Hi,

> Uh oh. I knew this would eventually come up. 1.10.2
> But I will be upgrading. I just need the two systems to have the same version at first. Please don't scold me or tell me "just upgrade" :) The problem does not exist on another system with the same version of Bric, so there must be a fix.

A quick workaround should be to just change your template to:

my $build_date = POSIX::strftime( "%a, %d %b %Y %H:%M:%S -0800", localtime() );

or:

require POSIX;
my $build_date = POSIX::strftime( "%a, %d %b %Y %H:%M:%S -0800", localtime() );

Cheers,

Alex

--
Alex Krohn <alex@gossamer-threads.com>
Re: strftime not found [ In reply to ]
On May 26, 2010, at 2:59 PM, Fletcher, Michael wrote:

> On Wednesday, May 26, 2010 2:44 PM, David E. Wheeler wrote:
>
>> What version of Bricolage? This does sound like the issue Scott mentioned.
>
> Uh oh. I knew this would eventually come up. 1.10.2

Shouldn't matter for this. That issue was fixed in 1.8.6.

> But I will be upgrading. I just need the two systems to have the same version at first. Please don't scold me or tell me "just upgrade" :) The problem does not exist on another system with the same version of Bric, so there must be a fix.

Yeah, something is funky there.

Best,

David
RE: strftime not found [ In reply to ]
On Wednesday, May 26, 2010 3:11 PM, Alex Krohn wrote:

> A quick workaround should be to just change your template to:
>
> my $build_date = POSIX::strftime( "%a, %d %b %Y %H:%M:%S -0800", localtime() );

This works. I appreciate the workaround.

Thanks,
Mike