Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Editing features for advanced users

by meonkeys (Chaplain)
on Apr 27, 2002 at 20:16 UTC ( #162552=note: print w/replies, xml ) Need Help??


in reply to Editing features for advanced users

gmax++. Excellent article! I've been delving into so many features of vim I don't think I'll ever be able to use another editor. Exporting to syntax-highlighted, numbered HTML is cool. I've also never seen the 'showmatch' option, but always wanted it!

I just have one question for you, which may be more of a ctags question--I don't know. Say you have some perl...
#!/usr/bin/perl -w use strict; use Business::CreditCard qw(); Business::CreditCard::validate('4111111111111111') or die "The credit card number appears to be invalid\n";
When I run pltags.pl on this, it just returns "No tags found.". Isn't the function call a tag? I would expect it to make a tags file with a hyperlink to Business::CreditCard that points straight to the line where validate() is defined. Is this possible? I would so love to know the answer to this riddle. If I could do this it would be incredibly easy to navigate my perl code.

---
"A Jedi uses the Force for knowledge and defense, never for attack."

Replies are listed 'Best First'.
Re: Re: Editing features for advanced users
by gmax (Abbot) on Apr 29, 2002 at 05:19 UTC
    The purpose of the tags program is to bookmark where a variable or sub was declared, so that you can go back to that point when needed.
    Say you have this script:
    use DBI; use strict; my $DNS = shift; my $dbh = DBI->connect($DNS);
    Save it as test_DBI.pl and then run
    $ /your_path_to_it/pltags.pl test_DBI.pl `perldoc -l DBI`
    (perldoc -l returns the path of an installed module).
    Then, editing test_DBI.pl, if you have your cursor over the "connect" word, Ctrl-] will take you to the DBI.pm module, at the line where the "connect" sub was defined.
    In your case, replace the script and module names and you'll have some more tags available.
    HTH
     _  _ _  _  
    (_|| | |(_|><
     _|   
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://162552]
help
Chatterbox?
[choroba]: What about [metadoc:// Algorithm::Loops]?
[Corion]: choroba: Yeah, but handing off the request to Dancer,Plack, Mojolicious,LWP is easy once I have the data filled into some structure ;))
[choroba]: Algorithm::Loops
[Corion]: choroba: I'm using that to generate the permutations, but I don't know how the user can pass the intended values to my function in a sane way
[Corion]: I have a prototype that permutes the get_parameters, but the values used for the get parameters should be different from the values used for the headers and potentially for parts of the URL
[Corion]: But yes, in general, my approach will be "split the URL into another set of parameters, generate an array of allowed values for each parameter and then NestedLoops() over the set"
[choroba]: hmm... so you need something like bag from Test::Deep, but not for checking, but for generation
[Corion]: This has the dual use of easily requesting sequential URLs and also being suitable for testing
[Corion]: For testing, I want to skip all tests with the same value(s) once one test fails to cut down on the number of failing tests
[Corion]: choroba: Yes, in a way I

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2017-01-17 08:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (152 votes). Check out past polls.