Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Re: Re: Re: Source-Code Analysis?

by drewbie (Chaplain)
on May 18, 2004 at 20:53 UTC ( [id://354437]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: Source-Code Analysis?
in thread Source-Code Analysis?

Nope - I got the output of the script, followed by the module use information. I used the first example in the Synopsis section. It was just the one-liner. I'd cut-n-paste the results but I don't have access to the server I was using it on right now.
  • Comment on Re: Re: Re: Re: Re: Source-Code Analysis?

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Source-Code Analysis?
by rjray (Chaplain) on May 19, 2004 at 04:28 UTC

    Huh. Well, if you (or anyone else reading) can come up with a fairly small failure-case, I'll be happy to pick it apart and try to find the bug.

    --rjray

      I don't think it's possible to catch it since it's never use'd, require'd, or import'ed anywhere. Here's the code from Ima::DBI (version 0.33). I just don't see a way to find the DBIx::ContextualFetch usage unless there is someway at runtime to watch %INC, et al.
      sub set_db { my $class = shift; my $db_name = shift or $class->_croak("Need a db name"); $db_name =~ s/\s/_/g; my $data_source = shift or $class->_croak("Need a data source"); my $user = shift || ""; my $password = shift || ""; my $attr = shift || {}; ref $attr eq 'HASH' or $class->_croak("$attr must be a hash refere +nce"); $attr = $class->_add_default_attributes($attr); $class->_remember_handle($db_name); no strict 'refs'; *{ $class . "::db_$db_name" } = $class->_mk_db_closure($data_source, $user, $password, $attr); return 1; } sub _add_default_attributes { my ($class, $user_attr) = @_; my %attr = $class->_default_attributes; @attr{ keys %$user_attr } = values %$user_attr; return \%attr; } sub _default_attributes { ( RaiseError => 1, AutoCommit => 0, PrintError => 0, Taint => 1, RootClass => "DBIx::ContextualFetch" ); }

        Well, Devel::Modlist walks along %INC in an END block, so it should pick up any modules loaded as such.

        Just a thought, but I don't know whether "do 'file.pl';" updates %INC or not. Probably, and more than likely it's not being used in this case, anyway.

        --rjray

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://354437]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-19 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found