Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: SAX and PDL probs

by InfiniteSilence (Curate)
on Jan 24, 2012 at 17:54 UTC ( #949737=note: print w/replies, xml ) Need Help??

in reply to SAX and PDL probs

For problem #1 I recommend you include how the code you are calling uses the encoding_detect() function of XML::SAX::PurePerl. If you read the code you'll see that the warning you are seeing appears at the end of the function if none of the conditions it is looking for are satisfied.

For #2 I don't see any proj_init function:

pdl> help pj_init No PDL docs for 'pj_init'. Using 'whatis'. (Try 'apropos pj_init'?) 'pj_init'
So I guess you'll need to show some more code for that one as well.

Celebrate Intellectual Diversity

Replies are listed 'Best First'.
Re^2: SAX and PDL probs
by martinm (Novice) on Jan 25, 2012 at 09:52 UTC
    Cheers, this is the top of the script (/avprog/bin/ that is run:
    #!/usr/bin/perl use strict; use warnings; use Getopt::Long; use Avbrief::AlertingMap; use Avbrief::ProcControl; use Avbrief::DataLayer::CDBI::map_mainframe; use File::Basename; print "start of script"; die "this script must be run as 'abl'\n" unless ('abl' eq getpwuid($<) +); my $logpath = "/var/log/avbrief/".basename($0).".log"; my $timeout = (10 * 60);
    When it's run, I get the errors before the output of the print.
    # sudo -u abl /avprog/bin/ Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/ line 100. Undefined subroutine &Proj::proj_init_plus called at /usr/share/perl5/ +Avbrief/ line 89. . . . Undefined subroutine &Proj::proj_init_plus called at /usr/share/perl5/ +Avbrief/ line 89. start of script
    Which to me looks like the XML issue is not a script problem but a config/environment problem. Really confused now!!

    In /usr/lib/perl5/PDL/GIS/ is the following comment that lead to mention of proj_init_plus
    =head2 1.10 (23 April 2003) Judd Taylor - Changed from using the proj_init() type API in projects.h to th +e - proj_init_plus() API in proj_api.h. The old one was not that st +able...
    projPJ pj_init(int, char **); projPJ pj_init_plus(const char *)
Re^2: SAX and PDL probs
by martinm (Novice) on Jan 25, 2012 at 18:30 UTC
    OK, as stopping or starting apache2 gives the XML error, I tried running And got:
    perl /etc/apache2/ Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/ line 100. Unable to recognise encoding of this document at /usr/share/perl5/XML/ +SAX/PurePerl/ line 100. was not loaded at /etc/apache2/ line 12 couldn't connect to dbi:Pg:dbname=xxxxx;host=localhost at /etc/apache2 +/ line 12.
    Reduced to
    #!/usr/bin/env perl use strict; use warnings; use lib '/usr/share/perl/5.10.0'; use ModPerl::Registry; # use Apache::Registry; use Apache::DBI; use Apache::AuthDBI; Apache::DBI->connect_on_init('dbi:Pg:dbname=xxxxx;host=localhost', und +ef, undef, { RaiseError => 1, AutoCommit => 1 }) or die "couldn't connect"; 1;
    and get
    perl /etc/apache2/ was not loaded at /etc/apache2/ line 13 couldn't connect at /etc/apache2/ line 13.
    I'm closer to fixing the XML issue, but this one has me stumped! Let me know if this is veering off topic!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://949737]
[Corion]: ambrus: Details ;)
[ambrus]: Like <c>{ package AnyEvent::Impl:: Prima; use Prima; sub io{ my($s,%r)=@_; Prima::File->new( file=>$r{fh},mask =>("w"eq$r{poll}? fe::Write():fe:: Read())|fe:: Exception,onRead =>$r{cb},onWrite =>$r{cb}, onException=>$r{cb }) } sub timer { ... } push @AnyEvent::REGI
[ambrus]: argh, too long, let me try on scratchpad
[Corion]: . o O ( I seem to have improved my skills of getting other people to write code for me )

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2016-12-08 12:37 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (141 votes). Check out past polls.