Skip to content

I have ported your library to Perl as a Perl Module #3

@hadjiprocopis

Description

@hadjiprocopis

Thank you for providing this library. It is very useful for me.

I have ported your library into a Perl module which is published here (under Artistic License 2.0, GPL compatible):

https://metacpan.org/pod/String::Random::Regexp::regxstring

I have included your license and attributed the C++ source code to you.

If you want me to inlclude your full name, contact details or anything else, please contact
me, check my CPAN page for how : https://metacpan.org/author/BLIAKO

MANY THANKS for providing this software. It's useful, it works and it is fast.

Under Linux, I had to make some modifications to your Makefiles :

############################################
# Targets:
#   make clean
#   make all
#   make run
############################################

OUT_TARGET := regxstr
LIB_TARGET := libregxstr.a
SO_TARGET :=  libregxstr.so
INC_TARGET := regxstring.h

#DEBUG := -g -O0 -DTEST
RELEASE := -O2 -DNDEBUG
CXXFLAGS := -Wall -fPIC $(DEBUG) $(RELEASE)
ARFLAGS := cr
LIB := -lpcre

SRC := $(wildcard *.cpp)
OBJ := $(SRC:.cpp=.o)
DEP := $(OBJ:.o=.d)
HEADER := $(wildcard *.h)

CXXFLAGS+=-MD

all : lib so out

out : $(OUT_TARGET)

lib : $(LIB_TARGET)

so : $(SO_TARGET)

$(OUT_TARGET) : $(OBJ)
	$(CXX) -o $@ $^ $(LIB)

$(LIB_TARGET) : $(OBJ)
	$(AR) $(ARFLAGS) $@ $^

$(SO_TARGET) : $(OBJ)
	$(CXX) -shared -fPIC -o $@ $^

clean :
	$(RM) -f $(OBJ) $(OUT_TARGET) $(LIB_TARGET) $(SO_TARGET) *.d

run : $(OUT_TARGET)
	@echo "Test run :"
	@echo '\d{3}xxx[a-z]{3}[XYZ]{2}' | $(OUT_TARGET) 5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions