Mittwoch, 29. April 2015

1st version of meta_scan and meta_info available on github

meta_scan.pl and meta_info.pl are now running and archived at github.

Download current version at

https://github.com/jpr65/AndroidPerl

switch to AndroidPerl/tools directory.

Copy the android.cfg.pl file, rename (i.e. to your.cfg.pl) and adopt paths.

Then create info database by

  perl meta_scan.pl your.cfg.pl
 
Afterwards you can browse it by

  perl meta_info.pl your.cfg.pl
 
type "?" for help.

I currently develop

  meta_doc.pl
 
which will create a HTML documentation by static files:

1 File per class, directory structure same as scanned sources. With overview pages for classes.

This would be more handy on Android than command auto_info.pl.
I try to add a link to Html-Page for CPAN and Core Modules.

I also plan to integrate MetaGenerator of Scalar::Validation. It has infos about method parameters.

Using Git on Android

I need urgend a version control for my development at Android and several PCs at home and give git and github a second chance.

I installed "SGit" and "Git" Apps and wondered, were SGit stores the data, because you cannot configure it.

I found it in the git archive of SGit: Files are stored at:

/storage/emulated/legacy/Android/data/me.sheimi.sgit/files/repo/<repo-name>

Just edit them there. But you have to add every file manually for committing, if you use another editor than the buildin of SGit.

So I have to learn even more about how to handle Git archives...

I use a second App "Git" to check, if the data are really tranferred to Git archive. "Git" cannot push (update, checkin) the archive, only pull (get, retrieve) of files is possible. But thats perfect for my tests, and it can show History, what seems to be impossible for SGit.

Montag, 27. April 2015

Now meta_info is running

I cannot work with vim on Android. It is running, but not my philosophy. Therefore I cannot use perltags.
So I started a simple meta_info system for Perl classes and methods using my CPAN modules Report::Porf, PQL::Cache and Scalar::Validation.
Calling meta_scan.pl creates a PQL::Cache and dumps it into a file,
meta_info.pl reads the dumped Cache in less than a second and then you can query classes and methods by

c Porf (Lists all classes containing "Porf" in namespace or classname)
m new (same for methods)
mc Porf get_.* (All getters from all classes containing Porf)

you can use regexes like possible in PQL::Cache, and thats a lot of possibilities.

See following session with highlighted commands:

# Load from file .../perl_meta_dump.pl.dump
# 1167 class infos loaded.
# 10384 method infos loaded.
? c Path
command c Path
# select classes matching names by 'Path'
# 2 classes found

*=====+========================+==========*
|  ID |        fullname        | line_nbr |
*-----+------------------------+----------*
| 609 | ExtUtils::InstallPaths | 1        |
| 686 | File::Path             | 1        |
*=====+========================+==========*
? mc File::Path
command mc File::Path
# select methods of classes 'File::Path'
# 1 classes found.
# select methods with matching names by '.*'

*======+============+==========+=============*
|  ID  |    class   | line_nbr |     name    |
*------+------------+----------+-------------*
| 5414 | File::Path | 36       | _carp       |
| 5415 | File::Path | 41       | _croak      |
| 5416 | File::Path | 46       | _error      |
| 5421 | File::Path | 169      | _is_subdir  |
| 5419 | File::Path | 117      | _mkpath     |
| 5423 | File::Path | 257      | _rmtree     |
| 5424 | File::Path | 441      | _slash_lc   |
| 5417 | File::Path | 61       | make_path   |
| 5418 | File::Path | 66       | mkpath      |
| 5420 | File::Path | 164      | remove_tree |
| 5422 | File::Path | 187      | rmtree      |
*======+============+==========+=============*
? h
command h
[  1] c Path
[  2] mc Path

? qq
command qq

# Goodbye!

Mittwoch, 8. April 2015

Still searching for IDE

I'm still searching for an IDE to develop perl on Android. Currently I use "Droid Edit Free". vim is also available, but not my tool. Emacs is still not running.