Docker: Error response from daemon: driver failed programming external connectivity - docker-compose

So I am trying to run searxng in a docker container, but it just loads a blank page. Running docker-compose logs -f searxng spits out the following:
searxng | Traceback (most recent call last):
searxng | File "/usr/local/searxng/searx/search/processors/abstract.py", line 75, in initialize
searxng | self.engine.init(get_engine_from_settings(self.engine_name))
searxng | File "/usr/local/searxng/searx/engines/zlibrary.py", line 39, in init
searxng | resp = http_get('https://z-lib.org', timeout=5.0)
searxng | File "/usr/local/searxng/searx/network/__init__.py", line 165, in get
searxng | return request('get', url, **kwargs)
searxng | File "/usr/local/searxng/searx/network/__init__.py", line 96, in request
searxng | return future.result(timeout)
searxng | File "/usr/lib/python3.10/concurrent/futures/_base.py", line 446, in result
searxng | return self.__get_result()
searxng | File "/usr/lib/python3.10/concurrent/futures/_base.py", line 391, in __get_result
searxng | raise self._exception
searxng | File "/usr/local/searxng/searx/network/network.py", line 291, in request
searxng | return await self.call_client(False, method, url, **kwargs)
searxng | File "/usr/local/searxng/searx/network/network.py", line 287, in call_client
searxng | raise e
searxng | File "/usr/local/searxng/searx/network/network.py", line 272, in call_client
searxng | response = await client.request(method, url, **kwargs)
searxng | File "/usr/lib/python3.10/site-packages/httpx/_client.py", line 1513, in request
searxng | return await self.send(request, auth=auth, follow_redirects=follow_redirects)
searxng | File "/usr/lib/python3.10/site-packages/httpx/_client.py", line 1600, in send
searxng | response = await self._send_handling_auth(
searxng | File "/usr/lib/python3.10/site-packages/httpx/_client.py", line 1628, in _send_handling_auth
searxng | response = await self._send_handling_redirects(
searxng | File "/usr/lib/python3.10/site-packages/httpx/_client.py", line 1665, in _send_handling_redirects
searxng | response = await self._send_single_request(request)
searxng | File "/usr/lib/python3.10/site-packages/httpx/_client.py", line 1702, in _send_single_request
searxng | response = await transport.handle_async_request(request)
searxng | File "/usr/lib/python3.10/site-packages/httpx/_transports/default.py", line 307, in handle_async_request
searxng | with map_httpcore_exceptions():
searxng | File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
searxng | self.gen.throw(typ, value, traceback)
searxng | File "/usr/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
searxng | raise mapped_exc(message) from exc
searxng | httpx.ConnectTimeout
I'm running this on arch linux, maybe that could have something to do with it. Here is also my neofetch output:
- OS: Arch Linux x86_64
- Host: 81YM IdeaPad 5 14ARE05
- Kernel: 5.15.82-1-lts
- Packages: 1426 (pacman), 32 (flatpak)
- Shell: bash 5.1.16
- DE: GNOME 43.2
- CPU: AMD Ryzen 5 4600U with Radeon Graphics (12) # 2.100GHz
- GPU: AMD ATI 04:00.0 Renoir
- Memory: 8790MiB / 15364MiB
I followed all the steps for the installation, as well as following the 'How to use it' Link with no errors.
Running the command docker-compose up -d starts the containers without error, but trying to access localhost or 127.0.0.1 or 127.0.0.1:8080:8080 (as it states in the docker-compose.yaml file)

Related

Yocto glibc_2.30.bb fatal error: asm/unistd.h: No such file or directory

I am trying to build Yocto Zeus in Podman and getting the below error. I noticed that sigcontext.h header file .recipe-sysroot/usr/include/ only has 32bit version whereas unistd.h file copied under asm-generic directory.
./recipe-sysroot/usr/include/asm/sigcontext-32.h
./recipe-sysroot/usr/include/asm-generic/unistd.h
| ../sysdeps/unix/sysv/linux/sys/syscall.h:24:10: fatal error: asm/unistd.h: No such file or directory
| 24 | #include <asm/unistd.h>
| | ^~~~~~~~~~~~~~
| compilation terminated.
| Traceback (most recent call last):
| File "../scripts/gen-as-const.py", line 120, in <module>
| main()
| File "../scripts/gen-as-const.py", line 116, in main
| consts = glibcextract.compute_c_consts(sym_data, args.cc)
| File "/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/git/scripts/glibcextract.py", line 62, in compute_c_consts
| subprocess.check_call(cmd, shell=True)
| File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
| raise CalledProcessError(retcode, cmd)
| subprocess.CalledProcessError: Command 'arm-poky-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot -std=gnu11 -fgnu89-inline -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0=/usr/src/debug/glibc/2.30-r0 -fdebug-prefix-map=/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0=/usr/src/debug/glibc/2.30-r0 -fdebug-prefix-map=/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot= -fdebug-prefix-map=/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot-native= -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math -fno-stack-protector -Wstrict-prototypes -Wold-style-definition -fmath-errno -ftls-model=initial-exec -I../include -I/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/csu -I/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi -I../sysdeps/unix/sysv/linux/arm -I../sysdeps/arm/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm/armv7/multiarch -I../sysdeps/arm/armv7 -I../sysdeps/arm/armv6t2 -I../sysdeps/arm/armv6 -I../sysdeps/arm/include -I../sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/include -isystem /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.2.0/include-fixed -isystem /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/recipe-sysroot/usr/include -D_LIBC_REENTRANT -include /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DTOP_NAMESPACE=glibc -DGEN_AS_CONST_HEADERS -MD -MP -MF /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/tcb-offsets.h.dT -MT '/home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/tcb-offsets.h.d /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/tcb-offsets.h' -S -o /tmp/tmp2wx6srl6/test.s -x c - < /tmp/tmp2wx6srl6/test.c' returned non-zero exit status 1
| make[2]: *** [../Makerules:271: /home/dev/inode_zeus/build/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/glibc/2.30-r0/build-arm-poky-linux-gnueabi/tcb-offsets.h] Error 1
| make[2]: *** Waiting for unfinished jobs....
| In file included from ../signal/signal.h:291,
| from ../include/signal.h:2,
| from ../misc/sys/param.h:28,
| from ../include/sys/param.h:1,
| from ../sysdeps/generic/hp-timing-common.h:39,
| from ../sysdeps/generic/hp-timing.h:25,
| from ../nptl/descr.h:27,
| from ../sysdeps/arm/nptl/tls.h:42,
| from ../sysdeps/unix/sysv/linux/arm/tls.h:23,
| from ../include/link.h:51,
| from ../include/dlfcn.h:4,
| from ../sysdeps/generic/ldsodefs.h:32,
| from ../sysdeps/arm/ldsodefs.h:38,
| from ../sysdeps/gnu/ldsodefs.h:46,
| from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
| from ../sysdeps/unix/sysv/linux/arm/ldsodefs.h:22,
| from <stdin>:2:
| ../sysdeps/unix/sysv/linux/bits/sigcontext.h:30:11: fatal error: asm/sigcontext.h: No such file or directory
| 30 | # include <asm/sigcontext.h>
| | ^~~~~~~~~~~~~~~~~~
| compilation terminated.
|
ERROR: Task (/home/dev/inode_zeus/sources/poky/meta/recipes-core/glibc/glibc_2.30.bb:do_compile) failed with exit code '1'
DEBUG: Teardown for bitbake-worker
NOTE: Tasks Summary: Attempted 437 tasks of which 430 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/home/dev/inode_zeus/sources/poky/meta/recipes-core/glibc/glibc_2.30.bb:do_compile
Please note that I am able to build Jethro version using the Podman Container which runs Ubuntu16.04.
But, Zeus build is failing. Can someone tell me why these errors are seen?
I am able to resolve the issue by mapping the yocto build directory with host directory.
Yocto build worked liked a charm!
podman --storage-opt overlay.mount_program=/usr/bin/fuse-overlayfs --storage-opt overlay.mountopt=nodev,metacopy=on,noxattrs=1 run -it -v $PWD/my_yocto/build_output:/home/oibdev/yocto/build 4cbcb3842ed5

print lines between two timestamps which stamps span multiple files

I'm having an issue trying to accurately parse log files which time stamps may (or may not parse multiple files.
Example:
3 log files that get rotated so oldest logs are in time.log.3 and newest logs are in time.log.1
snapshot of the 3 log files
time.log.1
line 17 | 2021-03-17 21:08
line 18 | test5
line 19 | 2021-03-17 21:09
line 20 | test6
line 21 | 2021-03-18 22:10
line 22 | test7
line 23 | 2021-03-18 22:11
line 24 | test8
time.log.2
line 09 | 2021-03-16 21:04
line 10 | test9
line 11 | 2021-03-16 22:05
line 12 | test10
line 13 | 2021-03-17 19:06
line 14 | test11
line 15 | 2021-03-17 19:07
line 16 | test12
time.log.3
line 01 | 2021-03-16 19:00
line 02 | test1
line 03 | 2021-03-16 19:01
line 04 | test2
line 05 | 2021-03-16 20:02
line 06 | test3
line 07 | 2021-03-16 20:03
line 08 | test4
and so I parse them in reverse order using for loop and sed pattern match
for (( i = 3; i >= 1; --i )); do sudo cat time.log.$i | sed -nre '/2021-03-16 19:00/,/2021-03-16 19:01/p;'; done
all is good if you know exact timestamp:
line 01 | 2021-03-16 19:00
line 02 | test1
line 03 | 2021-03-16 19:01
but if I only know approx time range (like changeing it to 19:02) then because that exact pattern is not found it prints the rest of file...
for (( i = 3; i >= 1; --i )); do sudo cat time.log.$i | sed -nre '/2021-03-16 19:00/,/2021-03-16 19:02/p;'; done
yields this, but the 20:XX timestamps are outside the desire window of 19:00 thru 19:02... this is undesirable.
line 01 | 2021-03-16 19:00
line 02 | test1
line 03 | 2021-03-16 19:01
line 04 | test2
line 05 | 2021-03-16 20:02
line 06 | test3
line 07 | 2021-03-16 20:03
line 08 | test4
I need it to print only timestamps within a range, but am having trouble finding the answer... I've tried many google searches for awk, sed, perl, yet cannot land an answer... I feel I need to get past this hurdle before expecting larger time windows spanning multiple files to work...
Expounding on some of the criteria. The parse cannot happen upon the pipe (|) character, those Line number exists only to give context to the reverse order nature log file rotations and log info within the files. The parse can only happen upon the timestamps alone, and needs to contain all the "test#" info too in between the the timestamps, for not every line will have a timestamp.
This type of timestamp can be compared as a string. sed doesn't do comparisons, but awk does:
awk -F' [|] ' '$NF>="2021-03-16 19:00" && $NF<"2021-03-16 19:02"' time.log.{3,2,1}
Note that {3,2,1} is not a filename generating pattern (aka glob), and awk will quit if it encounters a non-existent file argument. It would be better if the files were named in such a way that log.* would work (i.e. sorted in ascending order lexicographically).
When not every line contains a timestamp, detecting if there is a timestamp might complicate things:
awk -F ' [|] ' '
$NF~/^[0-9]{4}(-[0-9]{2}){2} [0-9]{2}:[0-9]{2}$/ {x=$NF} x>=a; x>=b{exit}
' a='2021-03-16 21:00' b='2021-03-17 19:00' time.log.{3,2,1}
Or maybe the lines are grouped in pairs:
awk -F ' [|] ' '
NR%2==1 {x=$NF} x>=a; x>=b{exit}
' a='2021-03-16 21:00' b='2021-03-17 19:00' time.log.{3,2,1}
Maybe the input doesn't really contain ... | :
awk '
NR%2==1 {x=$0} x>=a; x>=b{exit}
' a='2021-03-16 21:00' b='2021-03-17 19:00' time.log.{3,2,1}

Display entire error message from logfile using powershell

One of the batch scripts creates a logfile and it can have error messages like as below
Msg 2714, Level 16, State 1:
Server 'ABC', Procedure 'proc_test1', Line 189:
There is already an object named 'table_test' in the database.
Msg 207, Level 16, State 4:
Server 'ABC', Procedure 'proc_test2', Line 197:
Invalid column name 'employee'.
Msg 207, Level 16, State 4:
Server 'ABC', Procedure 'proc_test2', Line 197:
Invalid column name 'address'.
Using a powershell script to read and report errors to a mail from the log file. And i'm using this, which excludes certain warning messages too.
Select-String -Path 'C:\Users\BatchLog_20200911.txt' -Pattern "Msg","Error" | Select-String -Pattern "SQLState = S1000, NativeError = 0" -notmatch | select-object -Property Line,LineNumber
Output is as below
Line LineNumber
---- ----------
Msg 2714, Level 16, State 1: 2791
Msg 207, Level 16, State 4: 2794
Msg 207, Level 16, State 4: 2797
CT-LIBRARY error: 2828
ct_results(): network packet layer: internal net library error: Net-Library operation terminated due to disconnect 2829
"Errors encountered during execution. Exited with status: 596" 4168
So, it just prints line which match the query. I want to print the next lines which has actual error message description. Any advise here. Thanks.
Use the -Context parameter of the Select-String cmdlet:
Select-String -Path 'C:\Users\BatchLog_20200911.txt' "Msg","Error" -Context 0,1 |
ForEach-Object {
if ($_.Context.PostContext[0] -notmatch 'SQLState = S1000, NativeError = 0') {
[pscustomobject] #{
Line = $_.Context.PostContext[0]
LineNumber = $_.LineNumber
}
}
}
-Context 0,1 captures 0 lines before and 1 line after along with the actually matching line.
In the resulting Microsoft.PowerShell.Commands.MatchInfo instance, .Context.PostContext[0] provides access to the first post-context (after) line.
With your sample input, the above yields:
Line LineNumber
---- ----------
Server 'ABC', Procedure 'proc_test1', Line 189: 1
Server 'ABC', Procedure 'proc_test2', Line 197: 4
Server 'ABC', Procedure 'proc_test2', Line 197: 7

Mongo connector [Mongodb - Elastic Search] Docker Crashes

docker-compose.yml, also i have enabled rs.initiate(config) for replica set. What am I doing wrong here? How to connect replica set. And how to know primary of replica set to initiate mongo-connector. I see Member techiez_db_container_1:27017 is now in state PRIMARY log after the crash. How to synchronise or wait for mongo_one container to become primary.
version: '3.3'
services:
mongo_one:
container_name: techiez_db_container_1
image: mongo
command: mongod --replSet techiez-set
ports: ['27017:27017']
networks: ['techiez']
mongo_two:
container_name: techiez_db_container_2
image: mongo
command: mongod --replSet techiez-set
ports: ['27018:27017']
networks: ['techiez']
mongo_three:
container_name: techiez_db_container_3
image: mongo
command: mongod --replSet techiez-set
ports: ['27019:27017']
networks: ['techiez']
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.16
container_name: elasticsearch
ports: ['9200:9200']
networks: [techiez]
mongoconnector:
image: yeasy/mongo-connector
links: ['elasticsearch:elasticsearch', 'mongo_one:mongo']
depends_on: ['mongo_one', 'mongo_two', 'mongo_three', 'elasticsearch']
networks: [techiez]
networks:
techiez: {}
Below is the Crash Log
mongoconnector_1 | Logging to mongo-connector.log.
mongoconnector_1 | Exception in thread Thread-1:
mongoconnector_1 | Traceback (most recent call last):
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 425, in __init__
mongoconnector_1 | self._ensure_connected(True)
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 1083, in _ensure_connected
mongoconnector_1 | self.__ensure_member()
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 957, in __ensure_member
mongoconnector_1 | member, nodes = self.__find_node()
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 1048, in __find_node
mongoconnector_1 | raise AutoReconnect(', '.join(errors))
mongoconnector_1 | pymongo.errors.AutoReconnect: mongo:27017 is not primary or master
mongoconnector_1 |
mongoconnector_1 | During handling of the above exception, another exception occurred:
mongoconnector_1 |
mongoconnector_1 | Traceback (most recent call last):
mongoconnector_1 | File "/usr/local/lib/python3.4/threading.py", line 920, in _bootstrap_inner
mongoconnector_1 | self.run()
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/mongo_connector/util.py", line 85, in wrapped
mongoconnector_1 | func(*args, **kwargs)
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/mongo_connector/connector.py", line 285, in run
mongoconnector_1 | tz_aware=self.tz_aware, **self.ssl_kwargs)
mongoconnector_1 | File "/usr/local/lib/python3.4/site-packages/pymongo/mongo_client.py", line 428, in __init__
mongoconnector_1 | raise ConnectionFailure(str(e))
mongoconnector_1 | pymongo.errors.ConnectionFailure: mongo:27017 is not primary or master
mongoconnector_1 |
techiez_mongoconnector_1 exited with code 0

Parsing a subroutine and determining arguments of function call in perl

I'm writing a perl script which needs to parse a file (or more specifically, a known sub in the file) find a specific function call, and retrieve all the arguments for that call. For example:
sub MySub {
# some code here...
# ...
MyFunction ([q{I}, q{want}], [qw(to get)],
["these", "arguments"]);
# ...
# more code...
}
I've been able to parse through the file grab the appropriate line/lines for the function call, and then I wrote my own local "MyFunction" which can grab the args. Then I use a stringy eval to call that function and get the arguments. Example:
sub MyFunction {
return #_;
}
# Not actually doing this, but this is what I might get from parsing:
my $lines = 'MyFunction ({arg1 => "hashref"}, ["arg2", "arrayref"], "etc...");';
my #arguments = eval $lines;
This works great, except for the fact that I'm using a stringy eval. The problem with parsing the argument directly out of the string is there are many different formats (including multiple lines) that are possible. So I guess is there an easy way to parse the arguments directly out of the string, or to call the function without a stringy eval?
Thanks a lot for any help!
You don't have to eval if you don't want to. You can use the name to get the symbol and then use that to get the code ref.
my $func = do {
no strict 'refs';
*{'main::MyFunction'}{CODE};
};
my #arguments = $func->( {arg1 => "hashref"}, ["arg2", "arrayref"], "etc..." );
Parsing Perl is hard (and there's a folk theorem that only Perl can parse Perl). Parsing perl with your own hand-rolled string hack is likely to end in disaster in all but the simplest cases. What you really want is a tool that can parse Perl and give you the arguments.
Our DMS Software Reegineering Toolkit can do this. See parse tree below,
obtained from a file that contains exactly OP's MySub example text:
C:\DMS\Domains\Perl\Tools\Parser>run ..\domainparser ++AST C:\temp\test.pl
Perl~Perl5 Domain Parser Version 2.6.15 DEBUG BUILD
Copyright (C) 1996-2015 Semantic Designs, Inc; All Rights Reserved; SD Confidential
Powered by DMS (R) Software Reengineering Toolkit
Using encoding Unicode-UTF-8?ANSI +CRLF +1 /^I
432 tree nodes in tree.
(Perl#Perl~Perl5=1#5c21d20^0 Line 1 Column 1 File C:/temp/test.pl
(statements#Perl~Perl5=10#5c21c80^1#5c21d20:1 Line 1 Column 1 File C:/temp/test.pl
(subroutine_head#Perl~Perl5=551#5c73680^1#5c21c80:1 Line 1 Column 1 File C:/temp/test.pl
(IDENTIFIER#Perl~Perl5=573#5c735e0^1#5c73680:1[`MySub'] Line 1 Column 5 File C:/temp/test.pl)IDENTIFIER
(prototype#Perl~Perl5=552#5c73640^1#5c73680:2 Line 1 Column 11 File C:/temp/test.pl)prototype
(attributes#Perl~Perl5=554#5c73660^1#5c73680:3 Line 1 Column 11 File C:/temp/test.pl)attributes
)subroutine_head#5c73680
(block#Perl~Perl5=4#5c21640^1#5c21c80:2 Line 1 Column 11 File C:/temp/test.pl
precomment 3:1 `# ...'
precomment 3:2 `# more code...'
(statement#Perl~Perl5=21#5c7cf40^1#5c21640:1 Line 5 Column 5 File C:/temp/test.pl
|(call_statement#Perl~Perl5=561#5c209a0^1#5c7cf40:1 Line 5 Column 5 File C:/temp/test.pl
| (IDENTIFIER#Perl~Perl5=573#5c73920^13#5c210a0:1#5c73ec0:1#5c778c0:1#5c21080:1#5c73e00:1#5c77860:1#5c209a0:1#5c7f860:1#5c73d60:1#5c77840:1#5c7f840:1#5c73560:1#5c777e0:1[`MyFunction'] Line 5 Column 5 File C:/temp/test.pl
| precomment 0:1 `# some code here...'
| precomment 0:2 `# ...')IDENTIFIER
| (L20#Perl~Perl5=514#5c7f240^3#5c206c0:2#5c209a0:2#5c21020:1 Line 5 Column 17 File C:/temp/test.pl
| (L20#Perl~Perl5=514#5c7b540^3#5c7f240:1#5c7c640:1#5c738e0:1 Line 5 Column 17 File C:/temp/test.pl
| (L1_term#Perl~Perl5=187#5c7a700^11#5c7abc0:1#5c7b540:1#5c7c860:1#5c7d280:1#5c7b620:1#5c7ad60:1#5c7a9a0:1#5c20840:1#5c7c1c0:1#5c7b8a0:1#5c7aaa0:1 Line 5 Column 17 File C:/temp/test.pl
| |(L20#Perl~Perl5=514#5c77da0^2#5c7a700:1#5c7a380:2 Line 5 Column 18 File C:/temp/test.pl
| | (constant#Perl~Perl5=101#5c73180^6#5c77bc0:1#5c77da0:1#5c77d60:1#5c77a00:1#5c7a420:1#5c77ae0:1 Line 5 Column 18 File C:/temp/test.pl
| | (string_prefix#Perl~Perl5=120#5c731a0^1#5c73180:1 Line 5 Column 18 File C:/temp/test.pl)string_prefix
| | (ORDINARY_STRING#Perl~Perl5=604#5c77400^1#5c73180:2[`I'] Line 5 Column 19 File C:/temp/test.pl)ORDINARY_STRING
| | )constant#5c73180
| | (constant#Perl~Perl5=101#5c77e00^6#5c7a6a0:2#5c7a740:2#5c7a2a0:2#5c7a160:2#5c77da0:2#5c7a140:2 Line 5 Column 24 File C:/temp/test.pl
| | (string_prefix#Perl~Perl5=120#5c7a020^1#5c77e00:1 Line 5 Column 24 File C:/temp/test.pl)string_prefix
| | (ORDINARY_STRING#Perl~Perl5=604#5c7a000^1#5c77e00:2[`want'] Line 5 Column 25 File C:/temp/test.pl)ORDINARY_STRING
| | )constant#5c77e00
| |)L20#5c77da0
| )L1_term#5c7a700
| (L1_term#Perl~Perl5=187#5c7b420^14#5c7b600:2#5c7b780:2#5c7b620:2#5c7c7c0:1#5c7e880:1#5c20600:1#5c7d160:1#5c7c0c0:1#5c7bf00:2#5c7bf80:2#5c20c20:1#5c7c360:1#5c7b540:2#5c7b560:2 Line 5 Column 34 File C:/temp/test.pl
| |(qw_constant#Perl~Perl5=113#5c7b260^1#5c7b420:1 Line 5 Column 35 File C:/temp/test.pl
| | (WORD_LIST_STRING_START#Perl~Perl5=630#5c7b180^1#5c7b260:1["("] Line 5 Column 37 File C:/temp/test.pl)WORD_LIST_STRING_START
| | (word_list#Perl~Perl5=117#5c7b240^1#5c7b260:2 Line 5 Column 38 File C:/temp/test.pl
| | (word_list#Perl~Perl5=117#5c7b200^1#5c7b240:1 Line 5 Column 38 File C:/temp/test.pl
| | (word_list#Perl~Perl5=116#5c7b1c0^1#5c7b200:1 Line 5 Column 38 File C:/temp/test.pl)word_list
| | (WORD#Perl~Perl5=633#5c7b1a0^1#5c7b200:2[`to'] Line 5 Column 38 File C:/temp/test.pl)WORD
| | )word_list#5c7b200
| | (WORD#Perl~Perl5=633#5c7b1e0^1#5c7b240:2[`get'] Line 5 Column 41 File C:/temp/test.pl)WORD
| | )word_list#5c7b240
| | (STRING_END#Perl~Perl5=620#5c7b220^1#5c7b260:3[")"] Line 5 Column 44 File C:/temp/test.pl)STRING_END
| |)qw_constant#5c7b260
| )L1_term#5c7b420
| )L20#5c7b540
| (L1_term#Perl~Perl5=187#5c20260^12#5c20e80:2#5c20ea0:2#5c20f20:2#5c20f60:2#5c205c0:2#5c20600:2#5c20620:2#5c20380:2#5c7f240:2#5c7f260:2#5c7e880:2#5c7e8a0:2 Line 6 Column 9 File C:/temp/test.pl
| (L20#Perl~Perl5=514#5c7e7e0^1#5c20260:1 Line 6 Column 10 File C:/temp/test.pl
| |(constant#Perl~Perl5=103#5c7d820^5#5c7de60:1#5c7e7e0:1#5c7e140:1#5c7f940:1#5c7dd60:1 Line 6 Column 10 File C:/temp/test.pl
| | (INTERPOLATED_STRING_START#Perl~Perl5=621#5c7d5e0^2#5c7d840:1#5c7d820:1["""] Line 6 Column 10 File C:/temp/test.pl)INTERPOLATED_STRING_START
| | (interpolated_string_content#Perl~Perl5=130#5c7d800^2#5c7d840:2#5c7d820:2 Line 6 Column 11 File C:/temp/test.pl
| | (interpolated_string_content#Perl~Perl5=129#5c7d7c0^1#5c7d800:1 Line 6 Column 11 File C:/temp/test.pl)interpolated_string_content
| | (ORDINARY_INTERPOLATED_STRING_CONTENT#Perl~Perl5=642#5c7c6e0^1#5c7d800:2[`these'] Line 6 Column 11 File C:/temp/test.pl)ORDINARY_INTERPOLATED_STRING_CONTENT
| | )interpolated_string_content#5c7d800
| | (STRING_END#Perl~Perl5=620#5c7d7e0^2#5c7d840:3#5c7d820:3["""] Line 6 Column 16 File C:/temp/test.pl)STRING_END
| |)constant#5c7d820
| |(constant#Perl~Perl5=103#5c7dc40^3#5c7e7e0:2#5c7e840:2#5c7e8e0:2 Line 6 Column 19 File C:/temp/test.pl
| | (INTERPOLATED_STRING_START#Perl~Perl5=621#5c76320^4#5c7dec0:1#5c7e420:1#5c7e400:1#5c7dc40:1["""] Line 6 Column 19 File C:/temp/test.pl)INTERPOLATED_STRING_START
| | (interpolated_string_content#Perl~Perl5=130#5c76800^4#5c7dec0:2#5c7e420:2#5c7e400:2#5c7dc40:2 Line 6 Column 20 File C:/temp/test.pl
| | (interpolated_string_content#Perl~Perl5=129#5c76140^1#5c76800:1 Line 6 Column 20 File C:/temp/test.pl)interpolated_string_content
| | (ORDINARY_INTERPOLATED_STRING_CONTENT#Perl~Perl5=642#5c76120^1#5c76800:2[`arguments'] Line 6 Column 20 File C:/temp/test.pl)ORDINARY_INTERPOLATED_STRING_CONTENT
| | )interpolated_string_content#5c76800
| | (STRING_END#Perl~Perl5=620#5c76180^4#5c7dec0:3#5c7e420:3#5c7e400:3#5c7dc40:3["""] Line 6 Column 29 File C:/temp/test.pl)STRING_END
| |)constant#5c7dc40
| )L20#5c7e7e0
| )L1_term#5c20260
| )L20#5c7f240
|)call_statement#5c209a0
)statement#5c7cf40
)block#5c21640
)statements#5c21c80
)Perl#5c21d20
You still have to walk over the parse tree and pick out the arguments. If you do pick up subtrees, they can be prettyprinted to generate the surface syntax string.