在KRL中生成GUID / UUID

时间:2011-04-20 04:18:47

标签: krl

KRL中是否有内置函数用于生成UUID的GUID(或类似的东西)?

1 个答案:

答案 0 :(得分:4)

我创建了一个包含可能阻碍您的网络服务的模块:UUID Module

像这样使用:

ruleset a8x165 {
    meta {
        name "UUID Module Example"
        description <<
            Example use of the UUID Module
        >>
        author "Sam Curren"
        logging off
        use module a8x164 alias uuid
    }

    dispatch {}

    global {}

    rule first_rule {
        select when pageview ".*" setting ()
        pre {
            testuuid = uuid:new_uuid();
        }
        notify("Hello World", "This is a UUID: #{testuuid}");
    }
}