Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Seekers of Perl Wisdom

( #479=superdoc: print w/ replies, xml ) Need Help??

If you have a question on how to do something in Perl, or you need a Perl solution to an actual real-life problem, or you're unsure why something you've tried just isn't working... then this section is the place to ask. Post a new question!

However, you might consider asking in the chatterbox first (if you're a registered user). The response time tends to be quicker, and if it turns out that the problem/solutions are too much for the cb to handle, the kind monks will be sure to direct you here.

User Questions
Verilog::Netlist parser
1 direct reply — Read more / Contribute
by perlUser345
on May 24, 2016 at 12:47
    Hey Perl monks! I'm trying to parse a verilog file and would like to get all the module names, input/output port names, whether they're inputs/outputs and the input/output sizes for them. For example:
    module mux_test( din_0 , din_1 , sel , mux_out ); input din_0, din_1, sel ; output [7:0] mux_out; //just as an example //stuff, stuff, and more stuff endmodule
    I'd like to get: inputs = din_0, din_1, sel;
    input size = 1 (for each of them);
    outputs = mux_out;
    output size = [7:0];
    module name = mux_test.
    I tried using Verilog::Netlist but I could only get module names and input/outputs but not their sizes. I used this code from user "toolic" and examples on cpan:
    sub show_hier { # Recursively descend through module hierarchy, # printing each module name and full hierarchical # specifier, all module port names, and all # instance port connections. my $mod = shift; my $indent = shift; my $hier = shift; my $cellname = shift; if ($cellname) { $hier .= ".$cellname"; } else { $hier = $mod->name(); } print "${indent}ModuleName=", $mod->name(), " HierInstName=$hier\n +"; $indent .= ' '; for my $sig ($mod->ports_sorted()) { print $indent, 'PortDir=', sigdir($sig->direction()), ' PortNam +e=', $sig->name(), "\n"; } for my $cell ($mod->cells_sorted()) { for my $pin ($cell->pins_sorted()) { print $indent, ' PinName=', $pin->name(), ' NetName=', $pin +->netname(), "\n"; } show_hier($cell->submod(), $indent, $hier, $cell->name()) if $c +ell->submod(); } }
    How can I get the input/output sizes on top of the names?
    Thanks for your help!
Collaborate on a module
4 direct replies — Read more / Contribute
by ASeekerOfWisdom
on May 24, 2016 at 10:17

    So sometime ago I adopted a module. The original author had not updated this module for a while and When I spoke to him he was glad I was taking this module over. So after some time I fixed it. Now that module is ready for a release to CPAN.

    So my question is how do I release this module on CAPN? Do I ask the author to release it or Do I release it under my pause ID? (I don't want to take the credit form the original author for doing a lot of the foundation work) This is my first time doing something like this so sorry if this sounds stupid.
Updating XML files
2 direct replies — Read more / Contribute
by Anonymous Monk
on May 24, 2016 at 07:44

    Hi all

    I have the below xml files and would like to merge/updated them.

    <termEntry id="1"> <descrip type="entryID">1</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm1</term> <termNote type="Note1">Note1</termNote> <termNote type="Note2">Note1</termNote> </tig> </langSet> <langSet xml:lang="FR"> <tig> <term>FrenchTerm1</term> </tig> </langSet> </termEntry> <termEntry id="2"> <descrip type="entryID">2</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm2</term> <termNote type="Note1">Note1</termNote> <termNote type="Note2">Note1</termNote> </tig> </langSet> <langSet xml:lang="FR"> <tig> <term>FrenchTerm2</term> </tig> </langSet> <langSet xml:lang="ES"> <tig> <term>SpanishTerm2</term> </tig> </langSet> </termEntry>
    <termEntry id="25"> <descrip type="entryID">1</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm1</term> </tig> </langSet> <langSet xml:lang="IT"> <tig> <term>ItalianTerm</term> </tig> </langSet> </termEntry> <termEntry id="26"> <descrip type="entryID">1</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm15</term> </tig> </langSet> <langSet xml:lang="IT"> <tig> <term>ItalianTerm15</term> </tig> </langSet> </termEntry>

    The expected output should be a file which contains updated ids (with new terms) and new ids, in case terms does not exist.

    In other words, if an EN term of the second file exists in the first file it should be added under the same term. Otherwise, it should be added as new term.

    <termEntry id="1"> <descrip type="entryID">1</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm1</term> <termNote type="Note1">Note1</termNote> <termNote type="Note2">Note1</termNote> </tig> </langSet> <langSet xml:lang="IT"> <tig> <term>ItalianTerm</term> </tig> </langSet> </termEntry> <langSet xml:lang="FR"> <tig> <term>FrenchTerm1</term> </tig> </langSet> </termEntry> <termEntry id="2"> <descrip type="entryID">2</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm2</term> <termNote type="Note1">Note1</termNote> <termNote type="Note2">Note1</termNote> </tig> </langSet> <langSet xml:lang="FR"> <tig> <term>FrenchTerm2</term> </tig> </langSet> <langSet xml:lang="ES"> <tig> <term>SpanishTerm2</term> </tig> </langSet> </termEntry> <termEntry id="26"> <descrip type="entryID">1</descrip> <langSet xml:lang="EN"> <tig> <term>EnglishTerm15</term> </tig> </langSet> <langSet xml:lang="IT"> <tig> <term>ItalianTerm15</term> </tig> </langSet> </termEntry>

    Do you have any idea on how can I start?

    Thanks in advance for your time and consideration.

sympa 6.2.15 installation
1 direct reply — Read more / Contribute
by rroopstr
on May 24, 2016 at 06:34
    I am totally new to PERL, however was able to make install sympa 6.2.15. after installing about 50 PERL modules (excepting Crypt::SMIME due to an unknown libcrypto issue) When running the wizard to define some required parameters that can't be guessed /home/sympa/bin/sympa_wizard.pl output: Can't use an undefined value as a HASH reference at /home/sympa/bin/Conf.pm line 207. %{$config_loading_result->{'numbered_config'}};
Selenium Screenshot
1 direct reply — Read more / Contribute
by Chaoui05
on May 24, 2016 at 05:35
    Hi monks ! Iam note sure it's totally a Perl question but i try my luck: I am doing some little tests using Selenium::Remote::Driver package. I would like now to COMPARE some screenshots amongst themselves with Selenium::Screenshot module. But my screenshots have different size. How can i do this ? Code example :
    my $driver = Selenium::Remote::Driver->new; $driver->set_window_size(320, 480); $driver->get('http://www.google.com/404'); my $white = Selenium::Screenshot->new(png => $driver->screenshot); # Alter the page by turning the background blue $driver->execute_script('document.getElementsByTagName("body")[0].styl +e.backgroundColor = "blue"'); # Take another screenshot my $blue = Selenium::Screenshot->new(png => $driver->screenshot); unless ($white->compare($blue)) { my $diff_file = $white->difference($blue); print 'The images differ; see ' . $diff_file . ' for details'; }
    Thanks to everyone !
Perl/Tk Version Dependency Issue
2 direct replies — Read more / Contribute
by rkabhi
on May 24, 2016 at 02:54
    Hello Perl Monks !!

    I need a Perl/Tk module which works with different versions of perl. We use Perl/Tk to create many scripts in our organisation. But the problem that we found lately was that we have different perl versions at different site locations.

    My observations so far:
    1) Tried invoking perl v5.10.1 to use Perl/Tk module that used to work fine with perl v5.8.8. There was a symbol lookup error pointed. After checking the online stuff for similar errors, I learnt that I will need to change the perl module.

    2) Installed Perl/Tk for perl v5.10.1. However, I landed up on similar error when tried using this newly downloaded Perl/Tk module with per v5.22.1. Also, I found that this newly downloaded Perl/Tk module for perl v5.10.1 is not working with perl v5.8.8

    3) Installed Perl/Tk for perl v5.22.1. This time I landed up in issues when I used this newly dowloaded Perl/Tk module with perl v5.10.1 or perl v5.8.8. The error said somewhat like this "Can't load Tk.pm" which again appeared as version dependency of Perl/Tk as it worked well with perl version for which it was downloaded.

    From above observations, one would assume that Perl/Tk module has a huge dependency on Perl versions. Everytime you upgrade your perl version, you need to also download a new compatible Perl/Tk module.

    The support I seek here is to answer below questions:

    Q-1) Is there any way that I can get a single Perl/Tk module which works for different Perl versions (or at least perl versions higher or same as perl v5.8.8)?

    Q-2) If the answer to above question is "Not Possible!". Then is it really wise to use Perl/Tk module in the projects? I assume here that there will be many other users who might have faced this problem. But to my surprise I could not find any reasonable help online. Requesting all perlmonks to throw some light here.

    Info that might be needed to refer:
    => OS used: Redhat Enterprise Linux Client (Release 6.7)
    => calling Tk module using "use Tk". The errors mentioned above are shown at this line.
    => Testing for a given Perl/Tk module with different perl version was done on different machines that has different perl versions installed
    => ______ - Let me know if any further info is needed.


    Thanks a lot for your support !!
Define regex substitution $1,$2,... from a string
3 direct replies — Read more / Contribute
by sylph001
on May 24, 2016 at 01:49

    Dear monks,

    Today I'm trying to define a regex substitution from a parameter which is received from outside.

    In the s/<regex>/<replacement>/ structure, both the <regex> and the <replacement> are passed from other strings.

    Seems the <regex> part works well, however for the <replacement> part, there is a '$1' to capture what's matched from the <regex> part and this seems not working.

    In fact, it looks like the '$1' was not interpretted at all.

     

    My script is like the following:

    $a = 'https://www.domain.com/aaa/bbb/file.zip'; $from = 'aaa.*\/(.+)$'; $to = 'file_publish?file=$1'; $a =~s/$from/$to/i; print "\$1: $1\n"; print "RESUTL: $a\n";

     

    The result is like:

    > ./pt_demo.pl
    $1:  file.zip
    RESUTL: https://www.domain.com/file_publish?file=$1

     

    But what I need is to replace the '$1' with the actual file name 'file.zip', so the result I actually need is like:

    RESUTL: https://www.domain.com/file_publish?file=file.zip

     

    My monks, could you please cast your light of wisdom on me to help me get the '$1' work regex substitution?

     

    My best wishes

Net::RabbitMQ can't make, help me~ thanks all!
1 direct reply — Read more / Contribute
by Perl_Love
on May 23, 2016 at 23:23
    [root@localhost /]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1- +noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:langu +ages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core [root@localhost /]# perl -V Summary of my perl5 (revision 5 version 16 subversion 3) configuration +: Platform: osname=linux, osvers=2.6.32-220.17.1.el6.x86_64, archname=x86_64-l +inux-thread-multi uname='linux worker1.bsys.centos.org 2.6.32-220.17.1.el6.x86_64 #1 + smp wed may 16 00:01:37 bst 2012 x86_64 x86_64 x86_64 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOU +RCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 + -grecord-gcc-switches -m64 -mtune=generic -Dccdlflags=-Wl,--enable +-new-dtags -Dlddlflags=-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOUR +CE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 +-grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro -DDEBUGGING +=-g -Dversion=5.16.3 -Dmyhostname=localhost -Dperladmin=root@localhos +t -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr -Dvendorprefix=/usr -D +siteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/us +r/local/lib64/perl5 -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share +/perl5/vendor_perl -Darchlib=/usr/lib64/perl5 -Dvendorarch=/usr/lib64 +/perl5/vendor_perl -Darchname=x86_64-linux-thread-multi -Dlibpth=/usr +/local/lib64 /lib64 /usr/lib64 -Duseshrplib -Dusethreads -Duseithread +s -Dusedtrace=/usr/bin/dtrace -Duselargefiles -Dd_semctl_semun -Di_db + -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -D +installusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/le +ss -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_ +r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endserven +t_r_proto -Ud_setservent_r_proto -Dscriptdir=/usr/bin -Dusesitecustom +ize' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und +ef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasin +g -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D +_FILE_OFFSET_BITS=64', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions +-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switc +hes -m64 -mtune=generic', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -f +stack-protector -I/usr/local/include' ccversion='', gccversion='4.8.5 20150623 (Red Hat 4.8.5-4)', gccos +andvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +6 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='gcc', ldflags =' -fstack-protector' libpth=/usr/local/lib64 /lib64 /usr/lib64 libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread +-lc -lgdbm_compat perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,--en +able-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_F +ORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buf +fer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro ' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT +_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: Fedora Patch1: Removes date check, Fedora/RHEL specific Fedora Patch3: support for libdir64 Fedora Patch4: use libresolv instead of libbind Fedora Patch5: USE_MM_LD_RUN_PATH Fedora Patch6: Skip hostname tests, due to builders not being netw +ork capable Fedora Patch7: Dont run one io test due to random builder failures Fedora Patch9: Fix find2perl to translate ? glob properly (RT#1130 +54) Fedora Patch10: Fix broken atof (RT#109318) Fedora Patch13: Clear $@ before "do" I/O error (RT#113730) Fedora Patch14: Do not truncate syscall() return value to 32 bits +(RT#113980) Fedora Patch15: Override the Pod::Simple::parse_file (CPANRT#77530 +) Fedora Patch16: Do not leak with attribute on my variable (RT#1147 +64) Fedora Patch17: Allow operator after numeric keyword argument (RT# +105924) Fedora Patch18: Extend stack in File::Glob::glob, (RT#114984) Fedora Patch19: Do not crash when vivifying $| Fedora Patch20: Fix misparsing of maketext strings (CVE-2012-6329) Fedora Patch21: Add NAME headings to CPAN modules (CPANRT#73396) Fedora Patch22: Fix leaking tied hashes (RT#107000) [1] Fedora Patch23: Fix leaking tied hashes (RT#107000) [2] Fedora Patch24: Fix leaking tied hashes (RT#107000) [3] Fedora Patch25: Fix dead lock in PerlIO after fork from thread (RT +#106212) Fedora Patch26: Make regexp safe in a signal handler (RT#114878) Fedora Patch27: Update h2ph(1) documentation (RT#117647) Fedora Patch28: Update pod2html(1) documentation (RT#117623) Fedora Patch29: Document Math::BigInt::CalcEmu requires Math::BigI +nt (CPAN RT#85015) RHEL Patch30: Use stronger algorithm needed for FIPS in t/op/crypt +.t (RT#121591) RHEL Patch31: Make *DBM_File desctructors thread-safe (RT#61912) RHEL Patch32: Use stronger algorithm needed for FIPS in t/op/taint +.t (RT#123338) RHEL Patch33: Remove CPU-speed-sensitive test in Benchmark test Built under linux Compiled at Nov 20 2015 03:29:53 %ENV: PERL5LIB="/root/perl5/lib/perl5:" PERL_LOCAL_LIB_ROOT=":/root/perl5" PERL_MB_OPT="--install_base /root/perl5" PERL_MM_OPT="INSTALL_BASE=/root/perl5" @INC: /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . [root@localhost Net--RabbitMQ-0.2.8]# perl Makefile.PL Writing Makefile for Net::RabbitMQ Writing MYMETA.yml and MYMETA.json [root@localhost Net--RabbitMQ-0.2.8]# make Skip blib/lib/Net/RabbitMQ.pm (unchanged) Skip blib/lib/Net/._RabbitMQ.pm (unchanged) gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" RabbitMQ.c RabbitMQ.xs: In function ‘internal_recv’: RabbitMQ.xs:185:11: warning: unused variable ‘val’ [-Wunused-variable] SV *val; ^ RabbitMQ.xs: In function ‘hash_to_amqp_table’: RabbitMQ.xs:252:3: warning: implicit declaration of function ‘amqp_cre +ate_table’ [-Wimplicit-function-declaration] amqp_create_table(conn, table, HvKEYS(hash)); ^ RabbitMQ.xs:263:7: warning: implicit declaration of function ‘amqp_tab +le_add_string’ [-Wimplicit-function-declaration] amqp_table_add_string(conn, table, amqp_cstring_bytes(key), amq +p_cstring_bytes(SvPV_nolen(value))); ^ RabbitMQ.xs:265:7: warning: implicit declaration of function ‘amqp_tab +le_add_int’ [-Wimplicit-function-declaration] amqp_table_add_int(conn, table, amqp_cstring_bytes(key), (uint6 +4_t) SvIV(value)); ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ_exchange_declare’: RabbitMQ.c:605:7: warning: variable ‘args’ set but not used [-Wunused- +but-set-variable] HV * args; ^ RabbitMQ.xs: In function ‘XS_Net__RabbitMQ_ack’: RabbitMQ.xs:527:7: warning: pointer targets in assignment differ in si +gnedness [-Wpointer-sign] l = SvPV(delivery_tag, len); ^ RabbitMQ.xs: In function ‘XS_Net__RabbitMQ_reject’: RabbitMQ.xs:545:6: warning: pointer targets in assignment differ in si +gnedness [-Wpointer-sign] l = SvPV(delivery_tag, len); ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ__publish’: RabbitMQ.xs:575:11: warning: unused variable ‘exchange’ [-Wunused-vari +able] char *exchange = "amq.direct"; ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ_new’: RabbitMQ.c:1510:9: warning: unused variable ‘clazz’ [-Wunused-variable +] char * clazz = (char *)SvPV_nolen(ST(0)) ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ_tx_select’: RabbitMQ.c:1636:7: warning: variable ‘args’ set but not used [-Wunused +-but-set-variable] HV * args; ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ_tx_commit’: RabbitMQ.c:1689:7: warning: variable ‘args’ set but not used [-Wunused +-but-set-variable] HV * args; ^ RabbitMQ.c: In function ‘XS_Net__RabbitMQ_tx_rollback’: RabbitMQ.c:1742:7: warning: variable ‘args’ set but not used [-Wunused +-but-set-variable] HV * args; ^ gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_api.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_connection.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_debug.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_framing.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_mem.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_socket.c gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack +-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BI +TS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack +-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m6 +4 -mtune=generic -DVERSION=\"0.2.8\" -DXS_VERSION=\"0.2.8\" -fPIC " +-I/usr/lib64/perl5/CORE" amqp_table.c Running Mkbootstrap for Net::RabbitMQ () chmod 644 RabbitMQ.bs rm -f blib/arch/auto/Net/RabbitMQ/RabbitMQ.so gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions - +fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switch +es -m64 -mtune=generic -Wl,-z,relro RabbitMQ.o amqp_api.o amqp_conne +ction.o amqp_debug.o amqp_framing.o amqp_mem.o amqp_socket.o amqp_tab +le.o -o blib/arch/auto/Net/RabbitMQ/RabbitMQ.so \ \ chmod 755 blib/arch/auto/Net/RabbitMQ/RabbitMQ.so cp RabbitMQ.bs blib/arch/auto/Net/RabbitMQ/RabbitMQ.bs chmod 644 blib/arch/auto/Net/RabbitMQ/RabbitMQ.bs Manifying blib/man3/Net::RabbitMQ.3pm /usr/bin/perl "-Iblib/arch" "-Iblib/lib" ._Makefile.PL ._Makefile Unrecognized character \x05; marked by <-- HERE after <-- HERE near co +lumn 2 at ._Makefile.PL line 1. make: *** [._Makefile] Error 255 [root@localhost Net--RabbitMQ-0.2.8]#
what is a pure perl equivalent for "net user username /domain"?
2 direct replies — Read more / Contribute
by kwolcott
on May 23, 2016 at 14:49
    Hi; what is a pure perl equivalent for "net user username /domain"? I need to programmatically remove inactive accounts (defined as those no longer employed by the firm) and the mechanism I currently am using, via Perl on Cygwin is to run "net user username /domain" for every username that I have for the two applications for which I am responsible for account management. Is there a Pure Perl module that will return a yes/no answer to the question "is xyz currently an employee?" Thanks, Ken Wolcott
Verilog parse:vhier to get input/output ports
1 direct reply — Read more / Contribute
by perlUser345
on May 23, 2016 at 13:07
    Hey perl monks! I'm trying to parse a verilog file and would like to get all the module names, input/output port names, whether they're inputs/outputs and the input/output sizes for them. For example:
    module mux_test( din_0 , din_1 , sel , mux_out ); input din_0, din_1, sel ; output [7:0] mux_out; //just as an example //stuff, stuff, and more stuff endmodule
    I'd like to get: inputs = din_0, din_1, sel;
    input size = 1 (for each of them);
    outputs = mux_out;
    output size = 8;
    module name = mux_test.
    I tried using vhier but I could only get module names with: vhier <name> --modules
    Is there any other tool I can use to do this and an example related to mine above would be appreciated.
    Thanks for your help!

    --Update!
    Solved the problem! Used Verilog::Netlist and data_type() for the size of inputs/outputs. Thanks toolic!

Add your question
Title:
Your question:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":


  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (11)
    As of 2016-05-24 17:18 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?