# Hyphenation in Perl package names [duplicate]

Possible Duplicate:
Line break in lines with colons

I have Perl package name defined as command:

\newcommand{\myperlpackage}{\texttt{XXXXX::YYYYY::ZZZZZ}}


How can I tell LaTeX to hyphen package name after double colon but without any hyphen char eg.

XXXXX::-
YYYYY::ZZZZZ


should be

XXXXX::
YYYYY::ZZZZZ

-
Maybe your question is answered here: Line break in lines with colons. (Possible duplicate?) –  Hendrik Vogt Mar 22 '11 at 13:59
Yes, the main point of both questions is the same, but that question is more general - that's why I probably can't find it. –  jesper Mar 22 '11 at 14:07
@jesper: So do the answers to that question answer yours? –  Andrew Stacey Mar 22 '11 at 14:09
@Andrew: So what do you think? –  Hendrik Vogt Mar 22 '11 at 14:28
I usually define a command \dbr for discretionary breakpoints like this: \newcommand\dbr{\disretionary{}{}{}}. Then you can write XXXX::\dbr YYYY::\dbr ZZZZ, which should have the effect you desire.
To explain, \discretionary<arg1><arg2><arg3> tells TeX that a line break is permissible and that it should put <arg1> before the breakpoint, <arg2> after the breakpoint (in the next line), and <arg3> in the case that no line break is performed. See the TeXbook (page 95) for more details.