Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Getting file and line number where a subroutine is declared

by ikegami (Pope)
on Feb 02, 2009 at 16:54 UTC ( #740744=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -le'
       print(exists(&Foo::some_sub)?1:0, defined(&Foo::some_sub)?1:0);
    ...
    10
    11
    foo
    
  2. or download this
    $ perl -le'
       print(exists($Foo::{not_a_sub})?1:0);
    ...
    '
    0
    1
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://740744]
help
Chatterbox?
[atcroft]: abner: So you are wanting to do something like my $sth = $dbh->prepare(' SELECT * FROM charge WHERE col1 = ? and col2 = ?;'); $sth->execute(' asdf', 'asdw');?
[atcroft]: (Full disclosure: I may have the idea right but small typographical errors, so please test any code I suggest. :) )
[atcroft]: abner: Or are you wanting to do something where you need to bind an array to a placeholder (in which case the bind_param_array method may be of use.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2017-01-24 03:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (202 votes). Check out past polls.