Mysterious error when under mod_perl

17 views
Skip to first unread message

Michael Lackhoff

unread,
Oct 24, 2012, 12:29:56 PM10/24/12
to Rose::HTML::Objects
I am in the process to move my applicaton to a new server with Ubuntu
12.04 and get errors when loading a form module. Further investigation
showed that I do not even need my own module. It is enough to add this
to the Apache configuration file:
<Perl>
use Rose::HTML::Text;
</Perl>
to get the following error message:

Can't locate object method "valid_html_attrs" via package
"Rose::HTML::Text" at /usr/local/share/perl/5.14.2/Rose/HTML/Text.pm
line 11.\nCompilation failed in require at
/etc/apache2/sites-includes/pvonline.conf line 13.\nBEGIN
failed--compilation aborted

the same "use Rose::HTML::Text;" in a command line script gives no
error. Any idea what is going wrong here?

-Michael

Michael Lackhoff

unread,
Oct 24, 2012, 2:46:47 PM10/24/12
to rose-htm...@googlegroups.com
Well, some more investigation showed that it had nothing to do with
mod_perl itself but that I had a "use Rose::HTML::Objects" in startup.pl
and the above error occurs if Rose::HTML::Text is loaded after
Rose::HTML::Objects. So this little script is enough to trigger the crash:

#!/usr/bin/perl
use Rose::HTML::Objects;
use Rose::HTML::Text; # and Bumm!

Is it possible to make it more immune to the loading sequence?

By the way, I tried to find the place where valid_html_attrs() is
defined or created but couldn't find it. I would be interested to know
from where it comes.

-Michael


John Siracusa

unread,
Oct 24, 2012, 3:00:14 PM10/24/12
to rose-htm...@googlegroups.com
On Wed, Oct 24, 2012 at 2:46 PM, Michael Lackhoff <mic...@lackhoff.de> wrote:
> Well, some more investigation showed that it had nothing to do with
> mod_perl itself but that I had a "use Rose::HTML::Objects" in startup.pl
> and the above error occurs if Rose::HTML::Text is loaded after
> Rose::HTML::Objects. So this little script is enough to trigger the crash:
>
> #!/usr/bin/perl
> use Rose::HTML::Objects;
> use Rose::HTML::Text; # and Bumm!

That script works for me. What version of Rose::HTML::Objects do you
have? You might need a newer version to resolve this.

-John

Michael Lackhoff

unread,
Oct 24, 2012, 5:12:55 PM10/24/12
to rose-htm...@googlegroups.com
On 24.10.2012 21:00 John Siracusa wrote:

>> #!/usr/bin/perl
>> use Rose::HTML::Objects;
>> use Rose::HTML::Text; # and Bumm!
>
> That script works for me. What version of Rose::HTML::Objects do you
> have? You might need a newer version to resolve this.

I tried it with both 0.616 and 0.610. That should be the most recent
version and the one I had on my previous server.
As I said, the problem only occurs if the modules are loaded in this
sequence. Everything is fine if I load them the other way round.

Since there are some more reports of the same problem in the archives,
perhaps it is dependent on the version of some other module? After all
both modules are from the same CPAN-distribution with little room for
incompatibilities and you cannot reproduce the problem. So it must be
something external but related, at least that is my guess.
I would like to track this down if you are interested, perhaps off list
like with another problem we could resolve some time ago.

One idea would be to compare the versions of the complete dependency
tree. But with your better knowledge of the code you might have other ideas.

-Michael

p.s.: I just tested the little script on the old server with perl 5.10.1
and RHTMLO 0.610: same problem.

John Siracusa

unread,
Oct 25, 2012, 4:03:49 PM10/25/12
to rose-htm...@googlegroups.com
On Wed, Oct 24, 2012 at 2:46 PM, Michael Lackhoff <mic...@lackhoff.de> wrote:
> Well, some more investigation showed that it had nothing to do with
> mod_perl itself but that I had a "use Rose::HTML::Objects" in startup.pl
> and the above error occurs if Rose::HTML::Text is loaded after
> Rose::HTML::Objects. So this little script is enough to trigger the crash:
>
> #!/usr/bin/perl
> use Rose::HTML::Objects;
> use Rose::HTML::Text; # and Bumm!

Just to update the list, upgrading base.pm to 2.18 fixed the problem.

-John
Reply all
Reply to author
Forward
0 new messages